home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / hprpldev.tar / sasm.doc < prev    next >
Text File  |  1991-07-12  |  284KB  |  10,363 lines

  1.  
  2.  
  3.  
  4.        1.  Getting Started
  5.  
  6.  
  7.        SASM.EXE is an assembler for the Saturn processor family.
  8.        As a historical note, the Saturn processor first appeared in
  9.        the HP 71B, and has since been used in various fashions for
  10.        other HP calculator models, including the HP 28 and the
  11.        HP 48.
  12.  
  13.        The file SASM.EXE should be installed in a directory such as
  14.        BIN, with the PATH variable set to include that directory.
  15.        An environment variable SASM_LIB should be set to point to
  16.        the file SASM.OPC.  For instance, if the opcode file is in
  17.        \LIB, the command "SET SASM_LIB=C:\LIB" should be added to
  18.        the autoexec.bat file.
  19.  
  20.        A file naming convention extends throughout the Saturn
  21.        development environment.  Sasm accepts input from files with
  22.        a ".a" extension, and produces listing files with a ".l"
  23.        extension and code files with a ".o" extension.
  24.  
  25.        Several options are available:
  26.  
  27.         Option     Description
  28.        ---------  ----------------------------------------------------------
  29.        A          Write listing to stdout
  30.        a lstfile  Write listing to "lstfile"
  31.        c column   Fields starting after "column" are considered comments
  32.        D sym=val  Defines symbol "sym" to have value "val" (default=1)
  33.        d dbgfile  Write debug information to "dbgfile"
  34.        E          Write C-like error messages to stderr
  35.        e          Write error messages to stderr
  36.        f flglist  Sets the flags indicated by "flglist" (comma separated)
  37.        H          Write object file as raw code (no object header or symbols)
  38.        h          Write object file as hexadecimal characters (no object
  39.                   header or symbols)
  40.        N          Suppress listing entirely
  41.        o objfile  Write object file to "objfile"
  42.        P plevel   Sets the processor level to "plevel" (0, 1, 2, or 3)
  43.        p patelen  Do a page break each "pagelen" lines
  44.        t opcfile  Read opcodes from file "opcfile"
  45.        w width    Set output page width to "width" columns (default 80)
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                   Page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.        Here is an example to illustrate Saturn coding and show what
  70.        a typical Saturn source file looks like.  The name of the
  71.        source file is "example.a".  The Saturn instructions are
  72.        explained later in this manual.
  73.  
  74.                TITLE   Example Saturn Assembly file
  75.        *
  76.        * External entry point: =ENTRY1
  77.        *
  78.        * This routine shifts the C register right 6 digits
  79.        * without altering the sticky bit value
  80.        *
  81.        =ENTRY1 P=      5
  82.                C=0     WP
  83.        ENTRY2  CSR     W
  84.                P=P-1
  85.                GONC    ENTRY2
  86.                P=      0
  87.                RTNCC
  88.                END
  89.  
  90.        Assembling this file with the command "sasm example.a"
  91.        generates a Saturn object file (example.o), and a list file
  92.        (example.l) which is shown on the next page.
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                   Page 2
  129.  
  130.  
  131.  
  132.  
  133.        Saturn Assembler  Example Saturn Assembly file  Tue Jul 21 16:35:38 1987
  134.        Ver. 1.40, 7/21/87                              example.a      Page    1
  135.  
  136.           1                     TITLE   Example Saturn Assembly file
  137.           2             *
  138.           3             * External entry point: =ENTRY1
  139.           4             *
  140.           5             * This routine shifts the C register right 6 digits
  141.           6             * without altering the sticky bit value
  142.           7             *
  143.           8 00000 25    =ENTRY1 P=      5
  144.           9 00002 A92           C=0     WP
  145.          10 00005 BF6   ENTRY2  CSR     W
  146.          11 00008 0D            P=P-1
  147.          12 0000A 5AF           GONC    ENTRY2
  148.          13 0000D 20            P=      0
  149.          14 0000F 03            RTNCC
  150.          15 00011               END
  151.  
  152.        [page break]
  153.  
  154.        Saturn Assembler  Example Saturn Assembly file  Tue Jul 21 16:35:38 1987
  155.        Ver. 1.40, 7/21/87  Symbol Table                example.a      Page    2
  156.  
  157.        =ENTRY1        Rel       0 #00000000 -     8
  158.         ENTRY2        Rel       5 #00000005 -    10    12
  159.  
  160.        [page break]
  161.  
  162.        Saturn Assembler  Example Saturn Assembly file  Tue Jul 21 16:35:38 1987
  163.        Ver. 1.40, 7/21/87  Statistics                  example.a      Page    3
  164.  
  165.        Input Parameters
  166.  
  167.          Source file name is example.a
  168.  
  169.          Listing file name is example.l
  170.  
  171.          Object file name is example.o
  172.  
  173.          Flags set on command line
  174.            None
  175.  
  176.        Errors
  177.  
  178.          None
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                   Page 3
  195.  
  196.  
  197.  
  198.  
  199.        2.  Saturn CPU Overview
  200.  
  201.  
  202.        The Saturn CPU is a proprietary CPU optimized for high-
  203.        accuracy BCD math and low power consumption.  The data path
  204.        is 4 bits wide.  Memory is accessed in 4-bit quantities
  205.        called ``nibbles'' or ``nibs''.  Addresses are 20 bits,
  206.        yielding a physical address space of 512K bytes.
  207.  
  208.  
  209.        2.1  Registers
  210.  
  211.  
  212.        There are four working 64-bit registers, five scratch 64-bit
  213.        registers, two 20-bit data pointer registers, one 4-bit
  214.        pointer register, a 20-bit program counter, a 16-bit input
  215.        register, and a 12-bit output register.  Return addresses
  216.        are stored on an eight-level hardware return stack that
  217.        accepts 20-bit addresses.  In addition, there are 4 Hardware
  218.        Status bits, a Carry bit, and 16 Program Status bits.  The
  219.        lower 12 Program Status bits can be manipulated as a 12-bit
  220.        register.
  221.  
  222.  
  223.        2.2  Working and Scratch Registers
  224.  
  225.  
  226.        The working registers A, B, C, and D are used for data
  227.        manipulation.  Working registers A and C are also used for
  228.        memory access.  The scratch registers R0, R1, R2, R3, and R4
  229.        are used to temporarily hold the contents of working
  230.        registers.
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                   Page 4
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.        2.3  Field Selection
  268.  
  269.  
  270.        Subfields of the working registers A, B, C, and D may be
  271.        accessed by the use of field selection.  The possible field
  272.        selections range from the entire register to any single
  273.        nibble of the register.  Certain subfields are designed for
  274.        use in BCD calculations.  Others are used for data access or
  275.        general data manipulation.
  276.  
  277.                          Field Selection Description
  278.  
  279.                P Nibble indicated by P register
  280.               WP Nibbles from nibble P through nibble 0, inclusive
  281.               XS Nibble 2;- Exponent sign
  282.                X Nibbles 2-0;- Exponent including exponent sign
  283.                S Nibble 15;- Mantissa sign
  284.                M Nibbles 14-3;- Mantissa
  285.                B Nibbles 1-0;- Byte field
  286.                A Nibbles 4-0;- Address field (20 bits)
  287.                W Nibbles 15-0;- Word (entire 64-bit register)
  288.  
  289.  
  290.                              Register Nibbles
  291.             +-----------------------------------------------+
  292.             |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
  293.             +-----------------------------------------------+
  294.             | S|                                   |XS|  B  |
  295.                |                 <- M ->           | <-X->  |
  296.                                              |   <- A ->    |
  297.             |                    <- W ->                    |
  298.  
  299.  
  300.        2.4  Pointer Registers
  301.  
  302.  
  303.        The 20 bit Data Pointer registers D0 and D1 are used to
  304.        contain addresses during memory access, and are used in
  305.        conjunction with the working registers.
  306.  
  307.        The 4 bit Pointer register P is used in Field Selection
  308.        operations with the working registers.
  309.  
  310.  
  311.        2.5  Input, Output, and Program Counter Registers
  312.  
  313.  
  314.        The input/output registers are used to communicate with the
  315.        system bus.  The program counter points to the next
  316.        instruction to be executed by the CPU.  The input register
  317.        IN is 16 bits, the output register OUT is 12 bits, and the
  318.        PC register is 20 bits.
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                                   Page 5
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.        2.6  Carry, Program Status, and Hardware Status Bits
  334.  
  335.  
  336.        The Carry bit is adjusted when a calculation or logical test
  337.        is performed.  During a calculation, such as incrementing or
  338.        decrementing a register, it is set if the calculation
  339.        overflows or borrows; otherwise it is cleared.  During a
  340.        logical test, such as comparing two registers for equality,
  341.        it is set if the test is true; otherwise it is cleared.
  342.  
  343.        The upper 4 Program Status bits are typically used to
  344.        indicate the state of the operating system.  The remaining
  345.        12 Program Status bits are generally available to
  346.        applications software, and may be manipulated collectively
  347.        as the ST register.
  348.  
  349.        The four Hardware Status bits are set (but not cleared) by
  350.        hardware-related events, and must therefore be cleared
  351.        beforehand in order to detect a particular occurrence.  They
  352.        are individually accessible by name.  The Module Pulled bit
  353.        (MP) is set whenever the *NINTX CPU input is pulled low
  354.        (regardless of whether an interrupt is actually executed).
  355.        The Sticky Bit (SB) is set when a non-zero bit shifts off
  356.        the right end of a working register as the result of a shift
  357.        instruction.  The Service Request (SR) bit is set as a
  358.        result of the SREQ?  instruction if any hardware service
  359.        request is pending.  The external Module Missing bit is set
  360.        by execution of a ``00'' opcode (RTNSXM instruction).
  361.  
  362.                        Hardware Status:  4 bits
  363.  
  364.                  Bit  Symbol  Name
  365.                  ---  ------  ------------------------------------
  366.                   3     MP    Module Pulled (*NINTX pulled low)
  367.                   2     SR    Service Request
  368.                   1     SB    Sticky Bit
  369.                   0     XM    External Module Missing
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.                                   Page 6
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.        2.7  Arithmetic Mode
  400.  
  401.  
  402.        The arithmetic mode is set by the SETHEX and SETDEC
  403.        instructions.  When SETHEX is executed, the arithmetic mode
  404.        is set so that all register arithmetic is performed in
  405.        hexadecimal mode.  When SETDEC is executed, the arithmetic
  406.        mode is set so that most register arithmetic is performed in
  407.        decimal mode.  The following instructions are *always*
  408.        performed in hexadecimal mode, regardless of the arithmetic
  409.        mode setting:
  410.  
  411.  
  412.                    P=P+1
  413.                    P=P-1
  414.                    C+P+1
  415.                    D0=D0+     n   D0=D0-     n
  416.                    D1=D1+     n   D1=D1-     n
  417.                    A=A+CON fs,n   A=A-CON fs,n
  418.                    B=B+CON fs,n   B=B-CON fs,n
  419.                    C=C+CON fs,n   C=C-CON fs,n
  420.                    D=D+CON fs,n   D=D-CON fs,n
  421.  
  422.        The arithmetic mode is not ``readable'', but can be inferred
  423.        by doing an appropriate operation, followed by a test.  For
  424.        example:
  425.  
  426.                LCHEX   9
  427.                C=C+1   P
  428.  
  429.        sets the carry if, and only if, the arithmetic mode is
  430.        decimal.
  431.  
  432.  
  433.        2.8  Loading Data from Memory
  434.  
  435.        When data is read from memory into a register, the CPU
  436.        places the lowest addressed nibble in the least significant
  437.        nibble of the register.
  438.  
  439.        For example, if the data shown below in memory is read into
  440.        the C register using the C=DAT1  4 instruction, the data in
  441.        the register will be arranged as shown.
  442.  
  443.                Memory
  444.               Location  Value              C Register
  445.               --------  -----      +------------------------+
  446.                 1000      6        |  | ... | 9 | 8 | 7 | 6 |
  447.                 1001      7        +------------------------+
  448.                 1002      8         15  ...   3   2   1   0
  449.                 1003      9
  450.  
  451.        This principle applies also to loading constants into a CPU
  452.        register such as C, D0, or D1, since the CPU must read the
  453.        constant from the instruction opcode in memory.  For
  454.        example, the instruction LCHEX 9876 produces the opcode
  455.  
  456.  
  457.  
  458.                                   Page 7
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.        336789 and the C register is loaded as shown above (assuming
  466.        P= 0).
  467.  
  468.  
  469.        2.9  Storing Data in Memory
  470.  
  471.  
  472.        When data is written from a register to memory, the CPU
  473.        places the least significant nibble of the register in the
  474.        lowest nibble of the addressed memory location.  For
  475.        example, if the data shown above in the C register is
  476.        written to memory using the DAT1=C  4 instruction, the data
  477.        will be written to memory as shown.
  478.  
  479.  
  480.        2.10  Interrupt System
  481.  
  482.  
  483.        All Saturn CPU interrupts cause a subroutine jump to address
  484.        #0000F.  Determining the cause of the interrupt is up to the
  485.        interrupt service routine at that address.
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                   Page 8
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.        3.  Conditional Assembly
  532.  
  533.        The assembler supports conditional assembly tests to allow
  534.        different code to be generated based on various conditions.
  535.        Conditions which can be tested include assembly flags set on
  536.        the command line or modified with the SETFLAG or CLRFLAG
  537.        instructions, the value of an assemble-time expression
  538.        compared to zero, the presence or absence of a symbol
  539.        definition, the (guaranteed) carry state (for example, after
  540.        GOYES the carry is clear), the current assembler pass
  541.        (useful for messages), and the presence of an opcode or
  542.        macro definition.
  543.  
  544.        The structure of a conditional assembly block is:
  545.  
  546.                 label   IF
  547.                           <<code if condition is true>>
  548.                 label   ELSE
  549.                           <<code if condition is false>>
  550.                 label   ENDIF
  551.  
  552.        The label and ELSE sections are optional.
  553.  
  554.        Conditional assembly blocks can be nested up to a maximum of
  555.        20 levels if a unique label is present for each nesting.  If
  556.        the label is omitted or not unique, the code assembled may
  557.        not nest as expected for the false block.  For example:
  558.  
  559.                1               IF      0
  560.                2               IF      1
  561.                3       * Flags 0 and 1 are set
  562.                4               ELSE
  563.                5       * Flag 0 is set, flag 1 is clear
  564.                6               ENDIF
  565.                7               ELSE
  566.                8               IF      1
  567.                9       * Flag 0 is clear, flag 1 is set
  568.               10               ELSE
  569.               11       * Flags 0 and 1 are clear
  570.               12               ENDIF
  571.               13               ENDIF
  572.  
  573.        If flag 0 is clear, the ELSE on line 4 is found as the ELSE
  574.        matching the IF      0.  The ELSE on line 7 and the ENDIF on
  575.        line 13 are flagged as errors (ELSE without matching IF,
  576.        ENDIF without matching IF).  Lines 5 and 11 are both
  577.        assembled.  If the nested IF statements had unique labels,
  578.        they would work as expected.
  579.  
  580.        For a list of the conditional assembly opcodes, see
  581.        ``Conditional Assembly'' in the ``Pseudo-Op Instructions''
  582.        section of the ``Saturn Assembler Mnemonics" appendix.
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.                                   Page 9
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.        4.  Using Macros
  598.  
  599.        This chapter explains how to create and use macros in your
  600.        source files.  The macro directives are MACRO, EXITM, and
  601.        ENDM.
  602.  
  603.        A macro is a named block of source statements.  When a macro
  604.        name is used as a statement, it is automatically replaced by
  605.        the block of source statements it represents.
  606.  
  607.        Macro definitions cannot be nested; the MACRO statement is
  608.        illegal within a macro call.
  609.  
  610.        Macro lines are not listed by default; to enable listing of
  611.        the macro expansion, use either the LISTM or SETLIST MACRO
  612.        statement.
  613.  
  614.  
  615.        4.1  Defining a Macro
  616.  
  617.        A macro definition consists of a MACRO statement, followed
  618.        by the source statements to make up the macro, followed by
  619.        an ENDM statement.  The label on the ENDM statement, if any,
  620.        must match the name of the macro (the label on the MACRO
  621.        statement).  Text which follows the MACRO statement on the
  622.        same line is ignored (comment only).  It is suggested that
  623.        the comments indicate the parameters which are expected when
  624.        the macro is called.  Up to nine parameters can be passed to
  625.        a macro when it is called.  The statements between the MACRO
  626.        statement and the ENDM statement are not assembled until the
  627.        macro is called.  Any assembler pseudo-ops within a macro
  628.        definition are executed when the macro is called, not when
  629.        it is defined.  An exclamation mark (!) in the first column
  630.        is removed from the line when the macro is called.  The rest
  631.        of the line is included in the expansion.
  632.  
  633.        Blank lines and comment lines are not normally included in
  634.        the macro expansion.  To include a blank line or a comment
  635.        line in a macro expansion, add an exclamation mark in the
  636.        first column.
  637.  
  638.        The dollar sign ($) is used in macros as a text substitution
  639.        character.  The character which follows the dollar sign
  640.        indicates the replacement:
  641.  
  642.        Sequence  Replacement Text
  643.        --------  ----------------------------------------------------
  644.           $$     $ (one dollar sign)
  645.           $0     Line number on which the macro was called
  646.           $<     Current source file name
  647.           $n     Parameter reference (1_n_9)
  648.          $(n)    Indirect parameter reference (1_n_9)
  649.          $(nf)   Formatted indirect parameter reference (1_n_9)
  650.  
  651.        Parameter references are replaced by the corresponding
  652.        parameter text.
  653.  
  654.  
  655.  
  656.                                  Page 10
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.        Indirect parameter references are replaced by the value of
  664.        the corresponding parameter when interpreted as an
  665.        expression.  Formatted indirect parameter references include
  666.        a format string f which follows the parameter number.  The
  667.        format string has the form [ : ] [ length ] [ format char ].
  668.        Length indicates the minimum number of characters to use.
  669.        The value is zero-filled if it requires fewer than length
  670.        digits.  The default length is one.  Format char controls
  671.        the radix and case of the value.  The table shows valid
  672.        format char values:
  673.  
  674.             Character    Description       Digit Characters
  675.             ---------  ----------------  ---------------------
  676.               H,X      Hexadecimal       0123456789ABCDEF
  677.               h,x      Hexadecimal       0123456789abcdef
  678.               D,d      Signed decimal    0123456789  (default)
  679.               U,u      Unsigned decimal  0123456789
  680.               O,o      Octal             01234567
  681.  
  682.  
  683.        The maximum combined nesting depth for macros and include
  684.        files is 20 levels.
  685.  
  686.  
  687.        4.2  Calling a Macro
  688.  
  689.  
  690.        To call a macro, specify the name of the macro as an
  691.        instruction.  The macro body will be included at this point
  692.        in the source file.  Parameters to be passed to the macro
  693.        follow the macro name on the line.  Up to nine parameters
  694.        may be passed to a macro.
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.                                  Page 11
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.        4.3  Parameter Assignment Rules
  730.  
  731.  
  732.        The parameter text on the macro call line is assigned to
  733.        parameters in the following way:
  734.  
  735.          1.  Skip all leading blanks and tabs and set the current
  736.              parameter number to one.
  737.  
  738.          2.  If the first character is a <, all text up to a > is
  739.              assigned to the current parameter number.  If the
  740.              first character is not a < and there is a comma (,) in
  741.              the remaining text, all text up to the comma is
  742.              assigned to the current parameter number.
  743.  
  744.              If the first character is a <, but there is not a > in
  745.              the remaining text, the < is considered to be a normal
  746.              text character.
  747.  
  748.          3.  If the first character is not a < and there is no
  749.              comma in the remaining text, all text up to the first
  750.              blank or tab is assigned to the current parameter
  751.              number.
  752.  
  753.          4.  Increment the parameter number.  If the parameter
  754.              number is less than nine, go back to step 2.
  755.  
  756.        NOTE: The comment column value is ignored for macro call
  757.        lines; only characters which follow the first blank or tab
  758.        following the last parameter are ignored.
  759.  
  760.  
  761.        4.4  Macro Example
  762.  
  763.        The (simple) example below is a macro that increments the A
  764.        register by the amount passed as a parameter.
  765.  
  766.  
  767.                    ADDTOA  MACRO
  768.                            LC(5)   $1
  769.                            A=A+C   A
  770.                    ADDTOA  ENDM
  771.  
  772.                            ...
  773.                            DAT0=A  M
  774.                            ADDTOA  312
  775.                            D0=D0+  12
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.                                  Page 12
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.        5.  File Access Statements
  796.  
  797.        There are three statements which access data in other files.
  798.        RDSYMB reads the symbols from a Saturn object file, INCLUDE
  799.        reads Saturn source statements from a file, and CHARMAP
  800.        simplifies the problem of working with a non-ASCII character
  801.        set often found in calculators.
  802.  
  803.        The file name for each of the statements can be specified
  804.        several ways.  The name can be specified by itself or
  805.        surrounded by quotes ("filename"), apostrophes ('filename'),
  806.        or brackets (<filename>).  If the file name contains blanks
  807.        or tabs, it must be quoted by one of these methods.
  808.  
  809.        Each statement uses an environment variable to determine
  810.        where to search for the file (the default is the current
  811.        directory and a system directory).  See the "Environment
  812.        Variables" appendix for more information about environment
  813.        variable names and defaults.
  814.  
  815.  
  816.        5.1  RDSYMB Statement
  817.  
  818.  
  819.        The RDSYMB statement reads the symbol table from a Saturn
  820.        object file.  All external symbols which are defined in the
  821.        object file and are not relocatable are available for use in
  822.        the file being assembled.  Symbols defined by a RDSYMB
  823.        statement are not included in the symbol table listing
  824.        unless they are actually used in the assembly.
  825.  
  826.  
  827.        5.2  INCLUDE Statement
  828.  
  829.  
  830.        The INCLUDE statement tells the assembler to read source
  831.        statements from the specified file.  The assembler reads
  832.        from the file until an END statement is processed or the end
  833.        of the file is reached.
  834.  
  835.        The lines read from include files are not normally listed.
  836.        Only pseudo-op statements and lines containing errors are
  837.        listed by default.  To enable full include file listing, use
  838.        either the SETLIST INCLUDE statement or the LISTM statement.
  839.        Included lines have a - after the line number in the
  840.        listing.  The line number shown in the listing is the line
  841.        within the include file.
  842.  
  843.  
  844.        5.3  CHARMAP Statement
  845.  
  846.  
  847.        The LAASC, LCASC, and NIBASC statements are of limited
  848.        usefulness when the character set used in a product is not
  849.        ASCII.  The CHARMAP statement allows the ASCII characters
  850.        specified in those statements to be automatically converted
  851.  
  852.  
  853.  
  854.                                  Page 13
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.        to a different character set.  For example, if a particular
  862.        product is only capable of displaying letters and digits,
  863.        the character set mapping might be A ... Z = #00 ... #19,
  864.        a ... z = #1A ... #35, and 0 ... 9 = #36 ... #40.  Using
  865.        CHARMAP with a file which contains all these pairings allows
  866.        the assembler to automatically convert all references to
  867.        ASCII characters to the corresponding character set
  868.        character.  This permits source files to be independent of
  869.        the actual character mapping by including a CHARMAP
  870.        statement at the start of the file.
  871.  
  872.        The mapping becomes effective when the CHARMAP statement is
  873.        executed; it does not affect ASCII characters preceding the
  874.        CHARMAP statement.  The effect of multiple CHARMAP
  875.        statements is cumulative.
  876.  
  877.  
  878.        5.3.1  Charmap_File_Format   The file indicated by the
  879.        CHARMAP statement contains a list of pairings, one pair per
  880.        line.  The first character position is the ASCII character
  881.        which is used in the source file, and the second character
  882.        position is the value which is used for the generated code.
  883.        Each character position can be either an ASCII character or
  884.        an escape sequence similar to those found in the C language.
  885.        The following table summarizes the escape sequences
  886.        recognized in a CHARMAP file:
  887.  
  888.        Sequence    ASCII code    Description
  889.        ----------  ----------    ------------------------------------
  890.        ASCII char     Same       The specified ASCII character
  891.           \a            7        BEL (alert character)
  892.           \b            8        BS (backspace)
  893.           \t            9        HT (tab)
  894.           \n           10        LF (linefeed)
  895.           \v           11        VT (vertical tab)
  896.           \f           12        FF (formfeed)
  897.           \r           13        CR (carriage return)
  898.           \\           92        Backslash
  899.           \xhh         Hex hh    Character with hex value hh
  900.                                  (\xh ok if not ambiguous)
  901.           \ddd      Octal ddd    Character with oct value ddd
  902.                                  (\dd or \d ok if not ambiguous)
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.                                  Page 14
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.        6.  Saturn Assembler Format and Mnemonics
  928.  
  929.  
  930.        This chapter describes the Saturn assembler instruction set.
  931.        The Saturn CPU has three variations used in several
  932.        products.  The 1LF2 was used in the first versions of the
  933.        HP-71B.  The 1LK7 is a variation of the 1LF2 used in later
  934.        versions of the HP-71B, the HP-18C, and the HP-28C.  The
  935.        1LR2 is an integrated CPU/ROM/RAM/Display Driver IC.  Each
  936.        new version of the Saturn CPU added new instructions to the
  937.        Saturn instruction set.  Instructions available in all
  938.        Saturn CPUs are referred to as "level 0" instructions.
  939.        Instructions available in the 1LK7 and 1LR2 but not the 1LF2
  940.        are referred to as "level 1" instructions.  Instructions
  941.        available only in the 1LR2 are referred to as "level 2"
  942.        instructions.  In this section, "level 1" instructions are
  943.        marked with an asterisk (*), "level 2" instructions are
  944.        marked with two asterisks (**).  Instructions with no mark
  945.        are "level 0" instructions.
  946.  
  947.  
  948.        6.1  Instruction Syntax
  949.  
  950.  
  951.        The assembler is "free format" and a space or tab is
  952.        required to delimit the different fields.  A label, if
  953.        present, must start in column one or two.  The format below
  954.        is a recommended column alignment:
  955.  
  956.             1       9       17              33       ...   80
  957.             -------------------------------------------------
  958.             Label   Opcode  Modifier        Comments ...
  959.             -------------------------------------------------
  960.  
  961.        6.1.1  Comments
  962.  
  963.        A comment line begins with an asterisk (*) in column one,
  964.        and may occur anywhere in the file.  An in-line comment may
  965.        begin with any non-blank character and must follow the
  966.        modifier field of an instruction (or the opcode if no
  967.        modifier is required).
  968.  
  969.  
  970.        6.1.2  Symbols_and_Labels
  971.  
  972.        A symbol is a name for a numeric value.  A symbol acquires
  973.        its value by appearing in the label field of certain
  974.        statements.  The word "symbol" is a general term for a
  975.        label, and the two are used interchangeably.
  976.  
  977.        Symbols consist of one to twelve alphanumeric characters
  978.        with the following restrictions:  the characters comma (,),
  979.        space ( ), and right parenthesis are prohibited, and special
  980.        care must be used if the first character is an equal sign
  981.        (=), colon (:), sharp (#), left parenthesis, or a digit (0
  982.        through 9).
  983.  
  984.  
  985.  
  986.                                  Page 15
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.        A symbol may be immediately preceded by an equal sign (=)
  994.        which declares the symbol to be an external symbol.  An
  995.        external symbol defined in one module may be referenced as
  996.        an external symbol by another module.  Such references are
  997.        resolved when the modules are linked together.  Certain
  998.        Saturn assemblers, such as the HP-71 FORTH/Assembler ROM,
  999.        have no associated linker and therefore do not support
  1000.        external symbols.  In this case, any leading equal sign is
  1001.        ignored.
  1002.  
  1003.        A symbol may instead be immediately preceded by a colon (:)
  1004.        which simply declares what follows to be a (local) symbol.
  1005.        Either an equal sign or a colon must be used with any symbol
  1006.        whose first character is in the special care category (=, :,
  1007.        #, (, 0-9).
  1008.  
  1009.        When a symbol is used as part of an expression, parentheses
  1010.        are required to delineate it.  That is, AD1-10 is a symbol
  1011.        but (AD1)-10 is a computed expression.
  1012.  
  1013.  
  1014.        6.1.3  Expressions
  1015.  
  1016.        Wherever an expression may appear in the modifier field of
  1017.        an instruction, it is represented by the symbol "expr" in
  1018.        the instruction descriptions below.  Expressions are
  1019.        evaluated using 32-bit signed integer math.  If a value does
  1020.        not fit within 32 bits, the most significant bits are lost
  1021.        (only the low 32 bits are saved).
  1022.  
  1023.                             Expression Components
  1024.  
  1025.            Component             Examples
  1026.            --------------------  -----------------------------------
  1027.            decimal constant      23434
  1028.  
  1029.            hexadecimal constant  #1FF0  (less than #100000000)
  1030.  
  1031.            ASCII constant        \AB\, 'AB' (4 or less characters)
  1032.  
  1033.            operator              +  addition
  1034.                                  -  subtraction
  1035.                                     synonym for * 256 +
  1036.                                  *  multiplication
  1037.                                  /  integer division
  1038.                                  %  modulo (remainder)
  1039.                                  ^  integer exponentiation
  1040.                                  &  bitwise AND
  1041.                                  !  bitwise OR
  1042.  
  1043.             *                    Current assembly program counter
  1044.  
  1045.            symbol                Symbol defined within this file
  1046.  
  1047.            (expression)          Parenthesized expression
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                                  Page 16
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.        Two classes of instructions require a modifier field which
  1060.        contains a constant of a specific type that does not conform
  1061.        to the above rules.  These are:
  1062.  
  1063.        1. Instructions with a string constant which can exceed
  1064.           4 characters:
  1065.  
  1066.            LAASC   \ASCII\       ( 8 characters maximum) **
  1067.            LCASC   \ASCII\       ( 8 characters maximum)
  1068.            NIBASC  \ASCII...\    (40 characters maximum)
  1069.            STRING  \ASCII...\    (40 characters maximum)
  1070.  
  1071.        2. Instructions with a required hexadecimal constant:
  1072.  
  1073.            LAHEX   0123456789ABCDEF    (16 digits maximum) **
  1074.            LCHEX   048C3               (16 digits maximum)
  1075.            NIBHEX  0123456789ABCDEF    (80 digits maximum)
  1076.  
  1077.  
  1078.        6.2  Explanation of Symbols
  1079.  
  1080.  
  1081.        In the descriptions of the Saturn assembler mnemonics, these
  1082.        symbols are defined as follows:
  1083.  
  1084.  
  1085.        a      The hex nibble used to encode the field selection in
  1086.               the assembled opcode of an instruction.  See the
  1087.               Field Select Table in the next section for details.
  1088.  
  1089.        b      The hex nibble used to encode the field selection in
  1090.               the assembled opcode of an instruction.  See the
  1091.               Field Select Table in the next section for details.
  1092.  
  1093.        d      The number of nibbles represented by a field
  1094.               selection field.  Used in calculating the execution
  1095.               cycle time of some instructions.  See the Field
  1096.               Select Table in the next section for details.  When
  1097.               used in an extended field selection fsd, represents
  1098.               an expression which indicates the number of nibbles
  1099.               of the register that will be affected by the
  1100.               instruction, proceeding from the low-order nibble to
  1101.               higher-order nibbles.
  1102.  
  1103.        expr   An expression that evaluates to an absolute or
  1104.               relocatable value, usually less than or equal to 5
  1105.               nibbles in length.
  1106.  
  1107.        fs     Field selection symbol.  See the Field Select Table
  1108.               in the next section for details.
  1109.  
  1110.        fsd    Extended field selection symbol.  Represents either a
  1111.               normal field selection symbol fs, or an expression
  1112.               that gives the number of nibbles d of the register
  1113.               that will be affected by the instruction, proceeding
  1114.               from the low-order nibble to higher-order nibbles.
  1115.  
  1116.  
  1117.  
  1118.                                  Page 17
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.        hh     Two-digit hex constant, such as 08 or F2.  Within an
  1126.               opcode represents the hex digits used to store the
  1127.               value of the expression in the opcode in reverse
  1128.               order (see "Loading Data From Memory").
  1129.  
  1130.        hhhh   Four-digit hex constant, such as 38FE.  Within an
  1131.               opcode, represents the hex digits used to store the
  1132.               value of the expression in the opcode in reverse
  1133.               order (see "Loading Data From Memory").
  1134.  
  1135.        hhhhh  Five-digit hex constant, such as 308FE.  Within an
  1136.               opcode, represents the hex digits used to store the
  1137.               value of the expression in the opcode in reverse
  1138.               order (see "Loading Data From Memory").
  1139.  
  1140.        label  A symbol defined in the label field of an
  1141.               instruction.
  1142.  
  1143.        m      A one-digit decimal integer constant.
  1144.  
  1145.        n      Represents an expression that evaluates to a 1-nibble
  1146.               value, unless specified otherwise.  Within an opcode,
  1147.               represents the hex digit used to store the assembled
  1148.               value of the expression in the opcode.
  1149.  
  1150.        nn     Represents an expression that evaluates to a 2-nibble
  1151.               value, unless specified otherwise.  Within an opcode,
  1152.               represents the hex digits used to store the assembled
  1153.               value of the expression in the opcode.
  1154.  
  1155.        nnnn   Represents an expression that evaluates to a 4-nibble
  1156.               value, unless specified otherwise.  Within an opcode,
  1157.               represents the hex digits used to store the assembled
  1158.               value of the expression in the opcode.
  1159.  
  1160.        nnnnn  Represents an expression that evaluates to a 5-nibble
  1161.               value, unless specified otherwise.  Within an opcode,
  1162.               represents the hex digits used to store the assembled
  1163.               value of the expression in the opcode.
  1164.  
  1165.        r,s    Represents a register (r alone) or a register pair (r
  1166.               and s used together).  The valid combinations are
  1167.               (r,s) = { (A,B), (B,C), (C,A), (D,C) }.
  1168.  
  1169.        ss     Represents a scratch register name (R0, R1, R2, R3,
  1170.               or R4).
  1171.  
  1172.        dp     Represents a data pointer name (D0 or D1).
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.                                  Page 18
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.        6.3  Field Select Table
  1192.  
  1193.  
  1194.        The following symbols are used in the instruction
  1195.        descriptions to denote field selections.
  1196.  
  1197.        There are two ways in which field selection is encoded in
  1198.        the opcode of an instruction.  These two patterns are shown
  1199.        in the table below, and are designated by the letters a and
  1200.        b.
  1201.  
  1202.                           Field Select Table
  1203.                           ------------------
  1204.  
  1205.                                               Opcode      Number
  1206.                                           Representation  of Nibs
  1207.        Field  Name and Description          (a) (b)         (d)
  1208.        -----  ----------------------      --------------  -------
  1209.          P    Pointer Field. Nibble          0   8           1
  1210.               specified by P pointer
  1211.               register.
  1212.         WP    Word-Through-Pointer Field.    1   9          P+1
  1213.               Nibbles P through 0.
  1214.         XS    Exponent Sign Field. Nib 2.    2   A           1
  1215.          X    Exponent Field.  Nibs 2-0.     3   B           3
  1216.          S    Sign Field.  Nibble 15.        4   C           1
  1217.          M    Mantissa Field.  Nibs 14-3.    5   D          12
  1218.          B    Byte Field.  Nibs 1-0.         6   E           2
  1219.          W    Word Field.  Nibs 15-0.        7   F          16
  1220.          A    Address Field.  Nibs 4-0.      F   -           5
  1221.  
  1222.        Some instructions have an entirely different opcode
  1223.        representation for the A field.
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.                                  Page 19
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.        6.4  Instruction Set Overview
  1258.  
  1259.  
  1260.        This is a summary of the Saturn instruction set, grouped by
  1261.        functional category.
  1262.  
  1263.        Fields of a register are indicated using the convention that
  1264.        a register name followed by a field in parentheses means
  1265.        that field of the register.  For example, C(A) means the A
  1266.        field of register C, and A(3:0) means nibbles 3 through 0 of
  1267.        register A.
  1268.  
  1269.  
  1270.        6.5  Jump Instructions
  1271.  
  1272.  
  1273.            GOTO    label   Unconditional relative jump;
  1274.                            range -2047, +2048 nibs.
  1275.            GOC     label   Relative jump if Carry is set;
  1276.                            range -127, +128 nibs.
  1277.            GONC    label   Relative jump if Carry is clear;
  1278.                            range -127, +128 nibs.
  1279.            GOSHORT label   Generate a short jump to label.
  1280.                            If the carry state cannot be
  1281.                            determined at assembly time, a
  1282.                            GOTO is generated.  If the carry
  1283.                            is known to be set, a GOC is
  1284.                            generated.  If the carry is known
  1285.                            to be clear, a GONC is generated.
  1286.            JUMP    label   Alias for GOSHORT.
  1287.            GOLONG  label   Unconditional long relative jump;
  1288.                            range -32766, +32769 nibs.
  1289.            GOVLNG  label   Absolute jump; range unrestricted.
  1290.            PC=(A)          *  Indirect jump; A(A) is the
  1291.                               address of the destination address.
  1292.            PC=(C)          ** Indirect jump; C(A) is the address
  1293.                               of the destination address.
  1294.            PC=A            ** Direct jump; A(A) is the
  1295.                               destination address.
  1296.            PC=C            ** Direct jump; C(A) is the
  1297.                               destination address.
  1298.            APCEX           ** Direct jump and save PC in A(A);
  1299.                               A(A) is the destination address.
  1300.            CPCEX           ** Direct jump and save PC in C(A);
  1301.                               C(A) is the destination address.
  1302.            GOYES  label    Relative jump if test is true (second
  1303.                            half of test instruction);
  1304.                            range -125, +130 nibs from test.
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.                                  Page 20
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.        6.6  Subroutine Call Instructions
  1324.  
  1325.  
  1326.            GOSUB   label   Relative jump to subroutine;
  1327.                            range -2044, +2051 nibs.
  1328.            GOSUBL  label   Long relative jump to subroutine;
  1329.                            range -32762, +32773 nibs.
  1330.            GOSBVL  label   Absolute jump to subroutine.
  1331.  
  1332.  
  1333.        6.7  Subroutine Return Instructions
  1334.  
  1335.  
  1336.            RTN             Return from subroutine.
  1337.            RTNSC           Return from subroutine and set Carry.
  1338.            RTNCC           Return from subroutine and clear Carry.
  1339.            RTNSXM          Return from subroutine and set
  1340.                            hardware status bit XM.
  1341.            RTI             Return from subroutine and enable
  1342.                            interrupt handling.
  1343.            RTNC            Return from subroutine if Carry is set.
  1344.            RTNNC           Return from subroutine if Carry is
  1345.                            clear.
  1346.            RTNYES          Return from subroutine if test is true
  1347.                            (second half of test instruction).
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.                                  Page 21
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.        6.8  Test Instructions
  1390.  
  1391.  
  1392.        All test instructions must be followed with a GOYES or a
  1393.        RTNYES instruction.  The test instruction and the following
  1394.        GOYES or RTNYES instruction together form a single 5-nibble
  1395.        opcode.  The Carry is set when the test is true and cleared
  1396.        when the test is false.  All register comparisons are
  1397.        unsigned (#FFFFF is greater than #7FFFF).  The test is
  1398.        performed only on the selected field.
  1399.  
  1400.  
  1401.        6.8.1  Register_Tests
  1402.  
  1403.            ?r=s    fs      True if r(fs) and s(fs) are equal.
  1404.            ?r#s    fs      True if r(fs) and s(fs) are not equal.
  1405.            ?r=0    fs      True if r(fs) is zero.
  1406.            ?r#0    fs      True if r(fs) is non-zero.
  1407.            ?r>s    fs      True if r(fs) is greater than s(fs).
  1408.            ?s>r    fs      True if s(fs) is greater than r(fs).
  1409.            ?r<s    fs      True if r(fs) is less than s(fs).
  1410.            ?s<r    fs      True if s(fs) is less than r(fs).
  1411.            ?r>=s   fs      True if r(fs) is greater than or equal
  1412.                            to s(fs).
  1413.            ?s>=r   fs      True if s(fs) is greater than or equal
  1414.                            to r(fs).
  1415.            ?r<=s   fs      True if r(fs) is less than or equal
  1416.                            to s(fs).
  1417.            ?s<=r   fs      True if s(fs) is less than or equal
  1418.                            to r(fs).
  1419.  
  1420.  
  1421.        6.8.2  Pointer_Tests
  1422.  
  1423.            ?P=     n       True if P is equal to n.
  1424.            ?P#     n       True if P is not equal to n.
  1425.  
  1426.  
  1427.        6.8.3  Program_Status_Bit_Tests
  1428.  
  1429.            ?ST=0   n       True if status bit n is clear.
  1430.            ?ST=1   n       True if status bit n is set.
  1431.            ?ST#1   n       Alias for ?ST=0   n.
  1432.            ?ST#0   n       Alias for ?ST=1   n.
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.                                  Page 22
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.        6.8.4  Hardware_Status_Bit_Tests
  1456.  
  1457.            ?XM=0           True if XM bit (external module missing)
  1458.                            is clear.
  1459.            ?SB=0           True if SB bit (sticky bit) is clear.
  1460.            ?SR=0           True if SR bit (service request) is
  1461.                            clear.
  1462.            ?MP=0           True if MP bit (module pulled) is clear.
  1463.            ?HS=0   n       True if all bits corresponding to n are
  1464.                            clear.
  1465.  
  1466.  
  1467.        6.8.5  Register_Bit_Tests
  1468.  
  1469.            ?ABIT=0 n       ** True if bit n of register A is clear.
  1470.            ?ABIT=1 n       ** True if bit n of register A is set.
  1471.            ?CBIT=0 n       ** True if bit n of register C is clear.
  1472.            ?CBIT=1 n       ** True if bit n of register C is set.
  1473.            ?ABIT#1 n       ** Alias for ?ABIT=0 n.
  1474.            ?CBIT#1 n       ** Alias for ?CBIT=0 n.
  1475.            ?ABIT#0 n       ** Alias for ?ABIT=1 n.
  1476.            ?CBIT#0 n       ** Alias for ?CBIT=1 n.
  1477.  
  1478.  
  1479.        6.9  Pointer Instructions
  1480.  
  1481.  
  1482.        All arithmetic calculations on the pointer are performed in
  1483.        HEX mode.
  1484.  
  1485.            P=      n       Set register P to n.
  1486.            P=P+1           Increment P register; affects Carry.
  1487.            P=P-1           Decrement P register; affects Carry.
  1488.            C+P+1           Add P plus one to A field of C; affects
  1489.                            Carry.
  1490.            C=C+P+1         Alias for C+P+1.
  1491.            CPEX    n       Exchange P register and nibble n of C
  1492.                            register.
  1493.            P=C     n       Copy nibble n of C register to P register.
  1494.            C=P     n       Copy P register to nibble n of C register.
  1495.  
  1496.  
  1497.        6.10  Bit Manipulation Instructions
  1498.  
  1499.  
  1500.            ABIT=0  n       ** Clear bit n of register A.
  1501.            ABIT=1  n       ** Set bit n of register A.
  1502.            CBIT=0  n       ** Clear bit n of register C.
  1503.            CBIT=1  n       ** Set bit n of register C.
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.                                  Page 23
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.        6.11  Status Instructions
  1522.  
  1523.  
  1524.  
  1525.        6.11.1  Program_Status
  1526.  
  1527.            ST=0    n       Set status bit n.
  1528.            ST=1    n       Clear status bit n.
  1529.            CSTEX           Exchange status bits 11-0 with C(X).
  1530.            C=ST            Copy status bits 11-0 to C(X).
  1531.            ST=C            Copy C(X) to status bits 11-0.
  1532.            CLRST           Clear status bits 11-0.
  1533.  
  1534.  
  1535.        6.11.2  Hardware_Status
  1536.  
  1537.            XM=0            Clear XM bit (external module missing).
  1538.            SB=0            Clear SB bit (sticky bit).
  1539.            SR=0            Clear SR bit (service request).
  1540.            MP=0            Clear MP bit (module pulled).
  1541.            HS=0    n       Clear all bits corresponding to n.
  1542.            CLRHST          Clear all Hardware Status bits (XM, SB,
  1543.                            SR, and MP).
  1544.  
  1545.  
  1546.        6.11.3  System_State_Instructions
  1547.  
  1548.            SETHEX          Set arithmetic mode to hexadecimal.
  1549.            SETDEC          Set arithmetic mode to decimal.
  1550.            SREQ?           Set C(0) to service request response
  1551.                            from bus.  Set SR bit if service is
  1552.                            requested.
  1553.            C=RSTK          Pop subroutine return stack into C(A).
  1554.            RSTK=C          Push C(A) onto subroutine return stack.
  1555.            A=PC            ** Copy current PC into A(A).
  1556.            C=PC            ** Copy current PC into C(A).
  1557.            CONFIG          Configure a device to the address
  1558.                            in C(A).
  1559.            UNCNFG          Unconfigure a device at the address
  1560.                            in C(A).
  1561.            RESET           Send Reset command to system bus.
  1562.            BUSCB           ** Issue bus command B on the system
  1563.                            bus.
  1564.            BUSCC           Issue bus command C on the system bus.
  1565.            BUSCD           ** Issue bus command D on the system
  1566.                            bus.
  1567.            SHUTDN          Stop CPU here, stay in low-power state
  1568.                            until wake-up requested.
  1569.            C=ID            Copy chip ID from system bus to C(A).
  1570.            INTOFF          Disable maskable interrupts.
  1571.            INTON           Enable maskable interrupts.
  1572.            RSI             * Reset interrupt detect circuitry.
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.                                  Page 24
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.        6.11.4  Keyscan_Instructions
  1588.  
  1589.            OUT=C           Copy C(X) to OUT register.
  1590.            OUT=CS          Copy C(0) to low 4 bits of OUT register.
  1591.            A=IN            Copy IN register to A(3:0).
  1592.            C=IN            Copy IN register to C(3:0).
  1593.  
  1594.  
  1595.        6.11.5  Scratch_Register_Instructions
  1596.  
  1597.            A=ss            Copy ss to A.
  1598.            C=ss            Copy ss to C.
  1599.            ss=A            Copy A to ss.
  1600.            ss=C            Copy C to ss.
  1601.            AssEX           Exchange A with ss.
  1602.            CssEX           Exchange C with ss.
  1603.            A=ss.F  fs      ** Copy ss(fs) to A(fs).
  1604.            C=ss.F  fs      ** Copy ss(fs) to C(fs).
  1605.            ss=A.F  fs      ** Copy A(fs) to ss(fs).
  1606.            ss=C.F  fs      ** Copy C(fs) to ss(fs).
  1607.            AssEX.F fs      ** Exchange A(fs) with ss(fs).
  1608.            CssEX.F fs      ** Exchange C(fs) with ss(fs).
  1609.  
  1610.  
  1611.        6.11.6  Data_Pointer_Instructions
  1612.  
  1613.            dp=A            Copy A(A) to dp.
  1614.            dp=C            Copy C(A) to dp.
  1615.            AdpEX           Exchange A(A) with dp.
  1616.            CdpEX           Exchange C(A) with dp.
  1617.            dp=AS           Copy A(3:0) to (dp3:0).
  1618.            dp=CS           Copy C(3:0) to (dp3:0).
  1619.            AdpXS           Exchange A(3:0) with dp(3:0).
  1620.            CdpXS           Exchange C(3:0) with dp(3:0).
  1621.            dp=dp+  n       Increment register dp by n; alters
  1622.                            Carry.
  1623.            dp=dp-  n       Decrement register dp by n; alters
  1624.                            Carry.
  1625.            dp=HEX  hh      Load hh into dp(1:0).
  1626.            dp=HEX  hhhh    Load hhhh into dp(3:0).
  1627.            dp=HEX  hhhhh   Load hhhhh into dp.
  1628.            dp=(2)  expr    Load expr into dp(1:0); use low 2
  1629.                            nibbles of expr if too big.
  1630.            dp=(4)  expr    Load expr into dp(3:0); use low 4
  1631.                            nibbles of expr if too big.
  1632.            dp=(5)  expr    Load expr into dp; use low 5 nibbles
  1633.                            of expr if too big.
  1634.  
  1635.  
  1636.        6.11.7  Data_Transfer_Instructions
  1637.  
  1638.        If fsd is an expression, the value of the expression is the
  1639.        number of nibbles to transfer.  For example, if fsd is an
  1640.        expression whose value is 7, nibbles 6 through 0 will be
  1641.        transferred.
  1642.  
  1643.  
  1644.  
  1645.  
  1646.                                  Page 25
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.            A=DAT0  fsd     Read data pointed to by D0 into A(fsd).
  1654.            A=DAT1  fsd     Read data pointed to by D1 into A(fsd).
  1655.            C=DAT0  fsd     Read data pointed to by D0 into C(fsd).
  1656.            C=DAT1  fsd     Read data pointed to by D1 into C(fsd).
  1657.            DAT0=A  fsd     Write A(fsd) to location indicated by D0.
  1658.            DAT1=A  fsd     Write A(fsd) to location indicated by D1.
  1659.            DAT0=C  fsd     Write C(fsd) to location indicated by D0.
  1660.            DAT1=C  fsd     Write C(fsd) to location indicated by D1.
  1661.  
  1662.  
  1663.        6.11.8  Load_Constant_Instructions
  1664.  
  1665.        All constants are loaded into the target register least
  1666.        significant nibble first, with the least significant nibble
  1667.        loaded into r(P) and subsequent nibbles loaded at r(P+1),
  1668.        r(P+2), etc. until all nibbles have been loaded.  A constant
  1669.        can wrap around from r(15) to r(0).
  1670.  
  1671.            LAHEX   hhhhhhhh    ** Load hex constant hhhhhhhh into A.
  1672.            LCHEX   hhhhhhhh       Load hex constant hhhhhhhh into C.
  1673.            LAASC   \ASCII\     ** Load ASCII constant ASCII into A.
  1674.            LCASC   \ASCII\        Load ASCII constant ASCII into C.
  1675.            LA(m)   expr        ** Load an m-nibble constant into A;
  1676.                                   use low m nibbles of expression if
  1677.                                   too big.
  1678.            LC(m)   expr           Load an m-nibble constant into C;
  1679.                                   use low m nibbles of expression if
  1680.                                   too big.
  1681.            LA(N)   expr        ** Start an expr-nibble Load Constant
  1682.                                   into register A.  This is useful
  1683.                                   for Load Constants which are too
  1684.                                   large for LA(m) or which involve
  1685.                                   multiple external references.
  1686.            LC(N)   expr           Start an expr-nibble Load Constant
  1687.                                   into register C.  This is useful
  1688.                                   for Load Constants which are too
  1689.                                   large for LC(m) or which involve
  1690.                                   multiple external references.
  1691.  
  1692.        6.11.9  Shift_Instructions
  1693.  
  1694.        The term circular shift means that the nibble shifted out
  1695.        gets shifted in at the other end of the selected field.
  1696.        NOTE: Right shift instructions set the Sticky Bit if any
  1697.        non-zero bits are shifted out.
  1698.  
  1699.            rSRB               Shift reg r right one bit.
  1700.            rSRB.F  fs      ** Shift reg r(fs) right one bit.
  1701.            rSLC               Shift reg r left circular one nibble.
  1702.            rSRC               Shift reg r right circular one nibble.
  1703.            rSL     fs         Shift reg r(fs) left one nibble.
  1704.            rSR     fs         Shift reg r(fs) right one nibble.
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.                                  Page 26
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.        6.11.10  Arithmetic_Instructions
  1720.  
  1721.        NOTE: There is no s=r-s   fs instruction.  This means these
  1722.        instructions are not available on the Saturn CPU: B=A-B,
  1723.        C=B-C, A=C-A, and C=D-C.
  1724.  
  1725.            r=0     fs         Set r(fs) to zero.
  1726.            r=r-1   fs         Decrement r(fs); alters Carry.
  1727.            r=r+1   fs         Increment r(fs); alters Carry.
  1728.            r=s     fs         Copy s(fs) to r(fs).
  1729.            s=r     fs         Copy r(fs) to s(fs).
  1730.            rsEX    fs         Exchange r(fs) and s(fs).
  1731.            srEX    fs         Alias for rsEX    fs.
  1732.            r=r+CON fs,d    ** Add d to r(fs); alters Carry.
  1733.            r=r+r   fs         Add r(fs) to itself; alters Carry.
  1734.            r=r+s   fs         Add s(fs) to r(fs); alters Carry.
  1735.            r=s+r   fs         Alias for r=r+s   fs.
  1736.            s=r+s   fs         Add r(fs) to s(fs); alters Carry.
  1737.            s=s+r   fs         Alias for s=r+s   fs.
  1738.            r=r-CON fs,d    ** Subtract d to r(fs); alters Carry.
  1739.            r=r-s   fs         Subtract s(fs) from r(fs); alters Carry.
  1740.            s=s-r   fs         Subtract r(fs) from s(fs); alters Carry.
  1741.            r=s-r   fs         Subtract r(fs) from s(fs), put result in
  1742.                               r(fs); alters Carry.
  1743.            r=-r    fs         2's or 10's complement of r(fs); clear
  1744.                               Carry if r(fs) was zero, else set Carry.
  1745.            r=-r-1  fs         1's or 9's complement of r(fs);
  1746.                               unconditionally clear Carry.
  1747.  
  1748.  
  1749.        6.11.11  Logical_Operation_Instructions
  1750.  
  1751.            r=r&s   fs         Bit-wise AND of register r(fs) with
  1752.                               register s(fs).
  1753.            r=r!s   fs         Bit-wise OR of register r(fs) with
  1754.                               register s(fs).
  1755.  
  1756.  
  1757.        6.11.12  No-Operation_Instructions
  1758.  
  1759.            NOP3               Three nibble No-op.
  1760.            NOP4               Four nibble No-op.
  1761.            NOP5               Five nibble No-op.
  1762.  
  1763.  
  1764.        6.12  Pseudo-Op Instructions
  1765.  
  1766.  
  1767.        NOTE: The label field is ignored by some of the pseudo-op
  1768.        instructions.  These instructions ignore the label field:
  1769.        CHARMAP, CLRCARRY, CLRFLAG, CLRLIST, EJECT, INCLUDE,
  1770.        LISTALL, LISTM, LIST, MESSAGE, NOTREACHED, RDSYMB, SETCARRY,
  1771.        SETFLAG, SETLIST, STITLE, TITLE, and UNLIST.
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.                                  Page 27
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.        6.12.1  Data_Storage_Allocation
  1786.  
  1787.            BSS     nnnnn      Allocate nnnnn zero nibbles here.
  1788.            CON(m)  expr       Generate m-nibble constant.  The
  1789.                               constant is stored with the least
  1790.                               significant nibble at the lowest
  1791.                               address.  [1 _ m _ 8]
  1792.            REL(m)  label      Generate m-nibble relative offset.
  1793.                               The offset is stored with the least
  1794.                               significant nibble at the lowest
  1795.                               address.  [1 _ m _ 8]
  1796.            NIBASC  \ASCII\    Generate ASCII characters.  Each
  1797.                               character is stored with the least
  1798.                               significant nibble at the lowest
  1799.                               address.  The first character is
  1800.                               placed at the lowest address.
  1801.                               [40 characters maximum]
  1802.            STRING  \ASCII\    Generate ASCII characters, set the
  1803.                               high bit on the last character. Each
  1804.                               character is stored with the least
  1805.                               significant nibble at the lowest
  1806.                               address.  The first character is
  1807.                               placed at the lowest address.
  1808.                               [40 characters maximum]
  1809.            NIBHEX  hhhhhhh    Generate hexadecimal nibbles.  The
  1810.                               first nibble is placed at the lowest
  1811.                               address.  [80 nibbles max]
  1812.            NIBFS   fs         Generate the field selection nibble
  1813.                               for field fs. The opcode representation
  1814.                               used is from column a in the Field
  1815.                               Select Table.
  1816.            LINK    label      Generate five nibble relative offset
  1817.                               to the next LINK reference to label.
  1818.                               The value of the offset is filled in
  1819.                               by the linker.
  1820.            SLINK   label      Generate five nibble relative offset
  1821.                               to the first LINK reference to label.
  1822.                               The value of the offset is filled in
  1823.                               by the linker.
  1824.            INC(m)  label      Generate an m-nibble reference to
  1825.                               label which is passed to the linker.
  1826.                               The label must be an external symbol.
  1827.                               The linker fills in the position of
  1828.                               the INC(m) reference to label.  For
  1829.                               example, if a file contains three
  1830.                               INC(3)  =label references, the first
  1831.                               INC(3) will be filled in as 000, the
  1832.                               second INC(3) will be filled in as
  1833.                               100, and the third INC(3) will be
  1834.                               filled in as 200 (least significant
  1835.                               nibble of the position at the lowest
  1836.                               address).
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.                                  Page 28
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.        6.13  Conditional Assembly
  1852.  
  1853.  
  1854.        Conditional assembly pseudo-ops allow alternate versions of
  1855.        assembly code to be assembled dependent on some specific
  1856.        conditions.  An optional label on the conditional assembly
  1857.        statements allows nesting.
  1858.  
  1859.        Conditions which can be tested include assembly flags set on
  1860.        invocation, the value of an expression compared to zero, the
  1861.        relationship between two strings, the presence or absence of
  1862.        a symbol, the current carry state (for example, after GOYES
  1863.        or RTNYES, the carry is clear), and whether a specific
  1864.        mnemonic is available in this assembly (dependent on the
  1865.        processor level selected).
  1866.  
  1867.        label   IF      expr    Assemble code only if flag expr is set.
  1868.  
  1869.        label   IFEQ    expr    Assemble code only if expr is zero.
  1870.        label   IFNE    expr    Assemble code only if expr is
  1871.                                non-zero.
  1872.        label   IFLT    expr    Assemble code only if expr is less
  1873.                                than zero.
  1874.        label   IFLE    expr    Assemble code only if expr is less
  1875.                                than or equal to zero.
  1876.        label   IFGT    expr    Assemble code only if expr is greater
  1877.                                than zero.
  1878.        label   IFGE    expr    Assemble code only if expr is greater
  1879.                                than or equal to zero.
  1880.  
  1881.        label   IFZER   expr    Alias for IFEQ.
  1882.        label   IFNZ    expr    Alias for IFNE.
  1883.        label   IFNEG   expr    Alias for IFLT.
  1884.        label   IFPOS   expr    Alias for IFGT.
  1885.  
  1886.        label   IFDEF   symbol  Assemble code only if symbol is
  1887.                                defined now.
  1888.        label   IFNDEF  symbol  Assemble code only if symbol is
  1889.                                not defined now.
  1890.        label   IFOPC   symbol  Assemble code only if symbol is
  1891.                                a valid opcode mnemonic.
  1892.        label   IFNOPC  symbol  Assemble code only if symbol is
  1893.                                not a valid opcode mnemonic.
  1894.        label   IFPASS1         Assemble code only if this is the
  1895.                                first pass of the assembler. This
  1896.                                is most useful in conjunction with
  1897.                                the MESSAGE pseudo-op.
  1898.        label   IFPASS2         Assemble code only if this is the
  1899.                                second pass of the assembler.  This
  1900.                                is most useful in conjunction with
  1901.                                the MESSAGE pseudo-op.
  1902.        label   IFANYCARRY      Assemble code only if the carry can't
  1903.                                be determined at assembly time.
  1904.        label   IFCARRYCLR      Assemble code only if the carry can
  1905.                                be determined at assembly time and
  1906.                                the carry is clear.
  1907.  
  1908.  
  1909.  
  1910.                                  Page 29
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.        label   IFCARRYSET      Assemble code only if the carry can
  1918.                                be determined at assembly time and
  1919.                                the carry is set.
  1920.        label   IFREACHED       Assemble code only if the current
  1921.                                statement can be reached.
  1922.        label   ELSE            Reverse the sense of the IF test with
  1923.                                label "label".
  1924.        label   ENDIF           End conditional assembly started by
  1925.                                IF with label "label".
  1926.  
  1927.  
  1928.        6.14  Listing Control
  1929.  
  1930.  
  1931.        When no listing file is being generated (-N option), these
  1932.        pseudo-ops have no effect on the assembly.
  1933.  
  1934.            TITLE   text    Set title to text (at most one TITLE
  1935.                            instruction is permitted per file).
  1936.            STITLE  text    Set subtitle to text and force a new
  1937.                            page in the assembly listing.
  1938.            EJECT           Force a new page in the assembly listing.
  1939.            UNLIST          Turn off assembly listing except for
  1940.                            some pseudo-ops.
  1941.            LIST            Turn on assembly listing.
  1942.            LISTM           Turn on assembly listing for macro
  1943.                            expansion and include files.
  1944.            LISTALL expr    Unconditionally list the next expr lines.
  1945.                            LISTALL is independent of LIST and
  1946.                            UNLIST.  If expr is less than or equal
  1947.                            to zero or is not a legal expression,
  1948.                            disable LISTALL mode.
  1949.            CLRLIST type    Turn off assembly listing of type, where
  1950.                            type is one or more of { CODE, MACRO,
  1951.                            INCLUDE, PSEUDO, ALL }. If the type
  1952.                            includes NOLIST, the CLRLIST line is
  1953.                            not listed.
  1954.            SETLIST type    Turn on assembly listing of type, where
  1955.                            type is one or more of { CODE, MACRO,
  1956.                            INCLUDE, PSEUDO, ALL }.  If the type
  1957.                            includes NOLIST, the SETLIST line is
  1958.                            not listed.
  1959.  
  1960.        LIST is an alias for SETLIST CODE.  LISTM is an alias for
  1961.        SETLIST MACRO,INCLUDE.  UNLIST is an alias for
  1962.        CLRLIST CODE,MACRO,INCLUDE.
  1963.  
  1964.  
  1965.        6.15  Symbol Definition
  1966.  
  1967.  
  1968.        symbol  EQU   expr    Assigns the value expr to symbol. If
  1969.                              symbol is already defined, EQU
  1970.                              generates an error.
  1971.        symbol  =     expr    Assigns the value expr to symbol.  If
  1972.                              symbol is already defined, it is given
  1973.  
  1974.  
  1975.  
  1976.                                  Page 30
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.                              the new value expr.
  1984.  
  1985.  
  1986.        6.16  Macro Definition
  1987.  
  1988.  
  1989.        label   MACRO         Start definition of macro label.
  1990.        label   ENDM          End definition of macro label.
  1991.                EXITM         If reached while interpreting a macro,
  1992.                              terminate that macro interpretation
  1993.                              immediately.  EXITM has no effect
  1994.                              during the definition of a macro.
  1995.  
  1996.  
  1997.        6.17  Assembly Mode
  1998.  
  1999.  
  2000.        symbol  ABS   nnnnn   Specify an absolute assembly starting
  2001.                              at address nnnnn.
  2002.        symbol  REL   nnnnn   Specify a relocatable assembly
  2003.                              starting at address nnnnn.
  2004.                END           Terminate assembly with this line.
  2005.                              Any lines following the END instruction
  2006.                              are ignored.
  2007.  
  2008.  
  2009.        6.18  File Access
  2010.  
  2011.        These pseudo-ops allow access to other files.  This allows
  2012.        commonly-used symbols, macros, etc. to be defined in a file
  2013.        shared by several assembly files.
  2014.  
  2015.            RDSYMB  file    Read the symbol table from the Saturn
  2016.                            file named file.  Each symbol which is
  2017.                            defined, external, and not relocatable
  2018.                            is made available for the duration of
  2019.                            this assembly.
  2020.            INCLUDE file    Read assembly source statements from file
  2021.                            until either an END instruction is read
  2022.                            or an End-of-File condition occurs.
  2023.            CHARMAP file    Read a set of character mappings from
  2024.                            file.  Each line in the file consists of
  2025.                            an ASCII character, followed by the
  2026.                            character which should be assembled when
  2027.                            the character is used in an ASCII string.
  2028.                            (See "Charmap File Format" ).
  2029.  
  2030.  
  2031.        6.19  Assembly Flag Modification
  2032.  
  2033.  
  2034.            CLRFLAG expr    Clear assembly flag expr.
  2035.            SETFLAG expr    Set assembly flag expr.
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.                                  Page 31
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.        6.20  Carry State Modification
  2050.  
  2051.  
  2052.            CLRCARRY        Indicate to the assembler that the carry
  2053.                            is always clear at this point.
  2054.            SETCARRY        Indicate to the assembler that the carry
  2055.                            is always set at this point.
  2056.            NOTREACHED      Indicate to the assembler that this point
  2057.                            is never reached by assembly code.
  2058.  
  2059.  
  2060.        6.21  Miscellaneous
  2061.  
  2062.  
  2063.            MESSAGE text    Write text to the standard error location.
  2064.                            The message is written once for each
  2065.                            assembler pass.  This is most useful when
  2066.                            tracking down symbols which change between
  2067.                            passes.
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.                                  Page 32
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.        7.  Saturn Assembly Tips
  2116.  
  2117.  
  2118.        This chapter summarizes some general advice accumulated over
  2119.        many many man-years of Saturn programming in Corvallis.
  2120.        While no doubt incomplete, these should spare some agony.
  2121.  
  2122.  
  2123.        7.1  Three Warnings
  2124.  
  2125.  
  2126.        The following three "gotcha's" are lessons that have been
  2127.        learned repeatedly by every Saturn programmer.  You have
  2128.        been warned.
  2129.  
  2130.        7.1.1  Return_Levels
  2131.  
  2132.        If you have experience with standard processors, be aware
  2133.        that this one has a fixed number of return stack levels (8).
  2134.        As the interrupt system uses two of these whenever an
  2135.        interrupt occurs (which generally can be any time), HP 48
  2136.        programmers are limited to a maximum of 6 levels.  If code
  2137.        you write is called, you will be further limited.  The
  2138.        symptoms of violation will include a Warmstart, but may
  2139.        include more severe effects.  ...So watch those levels.
  2140.  
  2141.  
  2142.        7.1.2  Mode
  2143.  
  2144.        One of the big features of the Saturn processor, is also the
  2145.        programmers bane.  The processor supports both DEC and HEX
  2146.        modes.  Code designed to run in HEX mode can behave very
  2147.        badly if invoked from a DEC mode state and vice versa.
  2148.        ...So watch the mode.
  2149.  
  2150.  
  2151.        7.1.3  Remember_P=0!
  2152.  
  2153.        Many routines require P=0 as an entry condition (this
  2154.        includes the RPL inner loop by the way).  Quite frequently
  2155.        other routines don't care about the value of P on entry, but
  2156.        use it as a resource and exit with it in various states (eg;
  2157.        most of the floating point math routines).  This could be
  2158.        generalized to simply "watch entry and exit conditions", but
  2159.        this one seems to happen frequently.  ...So watch P=0.
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.                                  Page 33
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.        7.2  Code Packing Tips
  2182.  
  2183.        7.2.1  A-Field_Operations
  2184.  
  2185.        Frequently, use of the A field for register operations that
  2186.        require only the P,B,X or XS fields is a code saving.  Eg;
  2187.        Replace    "A=C   X" with "A=C   A"  field to save a nibble
  2188.        if you don't care about nibbles 3 and 4 of A.
  2189.  
  2190.  
  2191.        7.2.2  Loading_Constants
  2192.  
  2193.        For loading small constants into a larger field, it is
  2194.        frequently cheaper to clear the field and generate only the
  2195.        "digits" required.  For example if  kfactor < 256, than you
  2196.        will save a nibble of ROM and get the same effect with
  2197.  
  2198.                C=0      A
  2199.                LC(2)    kfactor
  2200.  
  2201.        instead of
  2202.                LC(5)    kfactor
  2203.  
  2204.  
  2205.  
  2206.        7.2.3  The_3-Branches
  2207.  
  2208.        There are 3 varieties of "GOTO" and "GOSUB" that require
  2209.        4,6, and 7 nibbles of code.  Two of these are "relative"
  2210.        branches, and the long one is "absolute".  The assembler
  2211.        takes care of all the details, informing you if a branch is
  2212.        out of range, so there is really no drawback to using the
  2213.        shorter versions when appropriate (they also execute faster
  2214.        by the way).  As a general rule, references to external
  2215.        routines (routines in the HP 48) should use the long
  2216.        version, and references to routines in your application
  2217.        should use relative branches.  The neumonics for the three
  2218.        varieties are:
  2219.  
  2220.                   GOTO           GOSUB                (4 nibs)
  2221.                   GOLONG         GOSUBL               (6 nibs)
  2222.                   GOVLNG         GOSBVL               (7 nibs)
  2223.  
  2224.  
  2225.        Numerous references to an external routine may be shortened
  2226.        by means of a "jump table".  Eg; Replace all "GOSBVL
  2227.        =GETPTR"  by calls to the local version ("GOSUB  getptr")
  2228.        below.
  2229.  
  2230.        getptr  GOVLNG   =GETPTR
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.                                  Page 34
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.        7.2.4  GOSUB/RTN
  2248.  
  2249.        Code that might naturally end with something like
  2250.                ...
  2251.                ...
  2252.                GOSUB    dotask8
  2253.                RTN
  2254.  
  2255.        will run faster, save 2 nibs, and may make your routine take
  2256.        less stack levels by replacing that combination with
  2257.                ...
  2258.                ...
  2259.                GOTO     dotask8
  2260.  
  2261.  
  2262.        7.2.5  Use_Expressions
  2263.  
  2264.        Use the Saturn Assembler to evaluate certain expressions
  2265.        instead of at run time.
  2266.  
  2267.        Example
  2268.  
  2269.                LC(5)    (=TBLADRS)+5*t2
  2270.  
  2271.  
  2272.        instead of
  2273.  
  2274.                LC(5)    =TBLADRS
  2275.                A=C      A
  2276.                LC(5)    5*t2
  2277.                C=C+A    A
  2278.  
  2279.  
  2280.        7.2.6  Count_Up
  2281.  
  2282.        Frequently P is used as the control variable for loops that
  2283.        require no more than 16 passes.  If the loop is structured
  2284.        so that P is decremented until a carry test causes an exit,
  2285.        the value of P on exit will be 15 (generally not a very
  2286.        useful value).  Often the code which follows will reset P to
  2287.        0.  Optionally you can avoid the need to reset P to 0 (save
  2288.        2 nibs) by counting up.  In this way, when the carry occurs,
  2289.        P will have become 0.
  2290.  
  2291.        Example
  2292.                P=      16-5       Compute x-5*y;  A:x, C:y
  2293.        arglp   A=A-C   A
  2294.                P=P+1
  2295.                GONC    arglp
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.                                  Page 35
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.        7.2.7  Before_you_leap
  2314.  
  2315.        One of the advantages of assembly language programming is
  2316.        the plethora of methods available to the innovator.  Often
  2317.        the first solution you think of will not be the most code
  2318.        efficient, time efficient, resource efficient, reliable, or
  2319.        easiest to implement.
  2320.  
  2321.        Speaking of time efficient - this document tells you about
  2322.        execution time.  Instruction execution time varies depending
  2323.        on instruction type and the fields that it operates on.
  2324.  
  2325.        In addition, when executing code out of standard 8-bit wide
  2326.        devices (ala HP 48 256 KByte ROM), instruction timing will
  2327.        vary depending on whether the instruction occurs on an even
  2328.        or odd address.  If one measures instruction timing on some
  2329.        sort of consistent scale, you find that instruction times
  2330.        will vary from 2 to 33 units of time.  The most time
  2331.        expensive instructions are those which access data in
  2332.        memory.  Also expensive are full word (16-nibble)
  2333.        operations.  The least expensive are operations on P.
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.                                  Page 36
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.        7.3  Some Common Operations
  2380.  
  2381.        7.3.1  A_nibble_from_here_to_there
  2382.  
  2383.        This type of operation is usually accomplished by one or
  2384.        more of the following 3 types of CPU instructions.  The
  2385.        "Thru P" variety can only be used in the C register.
  2386.  
  2387.        Register Transfer:
  2388.        ==================
  2389.        Example - Transfer nibble from C[P] to A[P]
  2390.                A=C      P
  2391.  
  2392.        Nibble Shifts:
  2393.        ==============
  2394.        Example - Shift B field of A into nibs 1 and 2 of A
  2395.                ASL.F    X
  2396.  
  2397.        Thru P:
  2398.        =======
  2399.        Example - Copy Sign field of C into nib 4 of C
  2400.                P=C      15
  2401.                C=P      4
  2402.  
  2403.  
  2404.        7.3.2  Testing_a_Bit
  2405.  
  2406.        This type of operation may be accomplished in a variety of
  2407.        ways depending on where the bit to be tested is located, the
  2408.        state of the CPU, and what CPU resources may be used.
  2409.  
  2410.        Direct Bit Test:
  2411.        ================
  2412.        Generally this is the best choice when it's available (only
  2413.        in nibbles 0-3 of A and C registers), as this is destructive
  2414.        only to the CARRY and depends only on the thing being
  2415.        tested.   It also has the advantage of working with symbolic
  2416.        arguments (which makes it easy when the location of the bit
  2417.        is changed).
  2418.  
  2419.        Example:
  2420.        bEDIT   EQU      6
  2421.                ...
  2422.                ...
  2423.                ?ABIT=1  bEDIT
  2424.                GOYES    doEDIT
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.                                  Page 37
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.        Left (Arithmetic) bit shifts in a field:
  2446.        ========================================
  2447.        Left bit shifts require HEX Mode, and are often used in
  2448.        cases where the bit lives in a location other than A[0-3] or
  2449.        C[0-3] and it is too expensive or otherwise undesirable to
  2450.        copy it there.  The shift is done arithmetically via HEX
  2451.        mode arithmetic, and is destructive to the field in which
  2452.        the operation is performed.  Your code is also dependent on
  2453.        the  bit#  being tested (not symbolic).
  2454.  
  2455.        Example - Test bit 2 in A[S]
  2456.                SETHEX
  2457.                A=A+A    S         Shift it to msb
  2458.                A=A+A    S         CS iff bit 2 was originally set.
  2459.                GOC      bit2_on
  2460.  
  2461.  
  2462.        Right bit shifts in a field:
  2463.        ============================
  2464.        Right arithmetic shifts are accomplished by provided CPU
  2465.        shift instructions.  When a non-zero bit is shifted out the
  2466.        right side of a field, a bit in the CPU known as the "sticky
  2467.        bit" (SB) is set.  This bit is "sticky" and must be
  2468.        explicitly cleared before it is used for a bit test.  The
  2469.        same example above could be done in either HEX or DEC mode
  2470.        by:
  2471.  
  2472.                ASRB.F   S         Move bit to position 1
  2473.                ASRB.F   S                     position 0
  2474.                SB=0               Prepare for test
  2475.                ASRB.F   S         SB=1 iff bit 2 originally set.
  2476.                ?SB=0
  2477.                GOYES    bit2_off
  2478.  
  2479.        The placement of the "SB=0" instruction is important.  There
  2480.        is no instruction to test  SB=1, hence the test sense
  2481.        reversal.
  2482.  
  2483.        Mask it out:
  2484.        ============
  2485.  
  2486.                P=       15
  2487.                LCHEX    4         C[S]: 0100  (Mask)
  2488.                A=A&C    S         Mask out all bits of non-interest.
  2489.                ?A#0     S         bit2 set?
  2490.                GOYES    bit2_on   Yes.
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.                                  Page 38
  2505.  
  2506.  
  2507.  
  2508.  
  2509.        7.3.3  Saving/Testing_a_State
  2510.  
  2511.        Frequently it is advantage to record a condition that may
  2512.        later be tested.  The 12 CPU (Local) Status Bits (S0-S11)
  2513.        are frequently used for this purpose.  The (Global) Status
  2514.        bits (S12-S15) are reserved for recording operating system
  2515.        status.  There is a functional difference also.  The Global
  2516.        Status bits cannot be swapped in and out of the C-Register
  2517.        like the others.  Be careful to document your usage of the
  2518.        status bits, as failure to exercise care here can result in
  2519.        contention for the same status bit and a "Gotcha".  As far
  2520.        as usage goes it's quite simple.  Use a symbolic name for
  2521.        the status bit (The symbol should be global if the status
  2522.        bit will be referenced in other files).
  2523.  
  2524.        Example:
  2525.        =sDMY   EQU      8               Day-Month-Year Date Format if Set.
  2526.                ...
  2527.                ...
  2528.                ?ST=1    sDMY            DD.MMYYYY Date Format?
  2529.                GOYES    date10          Yes.
  2530.                CDEX     B               No.  - Swap DD, MM
  2531.        date10
  2532.  
  2533.  
  2534.        7.3.4  Memory_Access
  2535.  
  2536.        The Saturn Processor Reads (Writes) from (to) low order
  2537.        memory nibble wise into (from) the low order nibs of either
  2538.        the A or C registers.  You will stay out of trouble if you
  2539.        remember low order of the register to low order memory.
  2540.        Thus an ASCII "A" stored in the B-field of CPU register A
  2541.        will appear as  A[B]: 41.  If this same value is written out
  2542.        to address  #82000,  you will see
  2543.  
  2544.                      #82000   1
  2545.                      #82001   4
  2546.  
  2547.        If memory is displayed from left to right in increasing
  2548.        addresses (as it is on our development systems),  the data
  2549.        will appear as
  2550.  
  2551.                      82000:14...
  2552.  
  2553.        making it appear backwards.  But all is well.  If the 2
  2554.        nibbles starting at address #82000 are read back into A[B]
  2555.        you will get what you expect (A[B]: 41).  The transfers take
  2556.        place by using one of the "Data Pointers" D0, D1 to specify
  2557.        the address.
  2558.  
  2559.        Example: Write ASCII "A" to address #82000:
  2560.  
  2561.                P=       0
  2562.                LC(2)     A
  2563.                D0=(5)   #82000
  2564.                DAT0=C   B               #82000: "A"
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.                                  Page 39
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.        7.4  Some Other Tips
  2578.  
  2579.  
  2580.  
  2581.        7.4.1  Labels
  2582.  
  2583.        Nothing prohibits you from using global labels on all
  2584.        routines.  Don't.  Use global labels only on routines that
  2585.        are referenced externally (ie; those that require them) or
  2586.        which might reasonably be called externally in the future.
  2587.        Use "global references" only where required.  This permits a
  2588.        code reviewer to know whether or not a routine that is being
  2589.        called is in the same file or not w/o referring to the
  2590.        symbol table.  (ie; if I see    "GOSUBL  =PADDER", I assume
  2591.        that PADDER is in another file - otherwise, why the "=" ?).
  2592.  
  2593.  
  2594.        7.4.2  Status_Bits
  2595.  
  2596.        All status bit usage should be symbolic.  That is; never
  2597.        write something like  "ST=0   5".  Instead, this can be
  2598.        "ST=0    sLOAN" where sLOAN has been equated to 5 elsewhere.
  2599.        In addition to the obvious advantage of self documenting
  2600.        status bit usage, this permits relativelty safe changes to
  2601.        the actual status bit in use at a later time.  The symbol
  2602.        table identifies all references to sLOAN for the purposes of
  2603.        making changes, avoiding status bit clash, etc.
  2604.  
  2605.  
  2606.        7.4.3  Entry_Points
  2607.  
  2608.        I find it is best to not have more than one Global entry in
  2609.        a given routine.  The main reason is that such a routine is
  2610.        frequently difficult to maintain.  Invariably the entry
  2611.        points will have different entry conditions (else why the
  2612.        separate entry).  This tenet may be violated in the interest
  2613.        of code conservation, but always balance it against the
  2614.        maintenence cost.  If you do it, and it's not completely
  2615.        obvious from a casual glance what the entry conditions need
  2616.        to be, insert a "mini-header" consisting of a few comment
  2617.        lines explaining what the entry conditions are.  Something
  2618.        like
  2619.  
  2620.        *****************************************************************
  2621.        ** Here:   A: Last Arg Count                                    *
  2622.        **         C: Loop Counter                                      *
  2623.        **         P: 14                                                *
  2624.        *****************************************************************
  2625.        =ARG50
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.                                  Page 40
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.        7.4.4  Exits
  2644.  
  2645.        Good "style" suggests that routines should not have more
  2646.        than one normal (non-error) exit.  This is something that
  2647.        gets violated with impunity in the interest of code saving.
  2648.        It is not unusual to find cases where use of a common exit
  2649.        actually saves code.  It's best to let code cost be the
  2650.        judge.  When it is a "push", use a common exit.
  2651.  
  2652.  
  2653.  
  2654.        7.5  Documentation
  2655.  
  2656.        7.5.1  Comments_on_Comments
  2657.  
  2658.        Any line beginning with an "*" is a comment line.  Comments
  2659.        are also inserted on the same line as code (no "*"
  2660.        required). Comments can be grouped into one of 3 types:
  2661.  
  2662.        Module level:
  2663.        =============
  2664.        These comments generally describe the nature of the code in
  2665.        the file, perhaps providing a list of the major routines,
  2666.        general conventions and notation that will be used in
  2667.        subsequent documentation, etc. This should appear at the
  2668.        front of the file (before code).
  2669.  
  2670.        Depending on your style, you may choose to place symbolic
  2671.        equates (eg; status bits, various constants, etc;) at the
  2672.        front of a file (These generate no code, but effect the code
  2673.        that references the symbols).  This makes it easy for a
  2674.        reviewer to find their values.
  2675.  
  2676.        Routine level:
  2677.        ==============
  2678.        These comments describe the general nature of a routine,
  2679.        it's inputs and outputs, and CPU and RAM resources altered
  2680.        by invocation.  These should appear in a header at the front
  2681.        of the routine.  Begin the coding process by inserting a
  2682.        standard blank header.  Fill in certain fields immediately
  2683.        (eg; name, abstract, implementation date) and others as soon
  2684.        as the code is reasonably stable.
  2685.  
  2686.        Line level:
  2687.        ===========
  2688.        Line by line comments will help the reviewer (which often
  2689.        will be you) wade thru the code later.  These should appear
  2690.        on the same line as the code or on separate lines near the
  2691.        code being documented.
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.                                  Page 41
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.        Guidelines:
  2710.        ===========
  2711.           1) How Much?  Generally, the more the better.  However not
  2712.              every line needs a comment, and some short, simple, local
  2713.              routines don't require a header.  If a routine has an
  2714.              external entry, it deserves a header.
  2715.  
  2716.           2) Avoid no content comments  (A=C  A    Copy C[A] to A[A])
  2717.  
  2718.           3) Avoid comments that document unimportant register
  2719.              contents.  This seems to help my focus.  For example,
  2720.              reviewers usually prefer #1 over #2:
  2721.  
  2722.                                     #1                    #2
  2723.              C=D     A                              C[A]: Last Arg Ptr
  2724.              A=C     A         A[A]: Last Arg Ptr   A[A]: Last Arg Ptr
  2725.              P=      0
  2726.              LC(5)   PROC5     C[A]: Exec Adrs      C[A]: Exec Adrs
  2727.  
  2728.           4) Put content into your comments.  They should be easily
  2729.              decipherable, but grammar is unimportant. Don't permit
  2730.              comment lines to be longer than what will be printed on
  2731.              the list (.l) files.
  2732.  
  2733.           5) The Saturn Assembler is free format allowing you to be
  2734.              quite flexible in your placement of code.  DON'T  OVERUSE
  2735.              THIS  FEATURE.  Employ standard fields.  The header on the
  2736.              next page has reasonable fields marked (1,9,17,28). The
  2737.              important thing is consistency.
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.                                  Page 42
  2769.  
  2770.  
  2771.  
  2772.  
  2773.        7.5.2  A_Standard_Assembly_Language_Header
  2774.  
  2775.        Some version of this header is in use by all of the software
  2776.        people generating Saturn Assembly Language Code.  There is
  2777.        no law saying you have to use this one, or use one at all.
  2778.        This one works, and has passed the test of time.
  2779.  
  2780.  
  2781.                EJECT
  2782.        *****************************************************************
  2783.        *****************************************************************
  2784.        ** Name: XXXXXXXXXXXX - .......
  2785.        **
  2786.        ** Category: .....
  2787.        **
  2788.        ** Abstract: .....
  2789.        **
  2790.        ** Entry:    .....
  2791.        **
  2792.        ** Exit:     .....
  2793.        **
  2794.        ** Error Exits: .....
  2795.        **
  2796.        ** Alters: CPU - .....
  2797.        **         RAM - .....
  2798.        **
  2799.        ** Calls:    .....
  2800.        **
  2801.        ** Stack Levels: .....
  2802.        **
  2803.        ** Notes: ......
  2804.        **
  2805.        **     Date     Prog             Modification
  2806.        **   --------   ----   ------------------------------------------
  2807.        **   04/../91   XX     Implemented.
  2808.        **===============================================================
  2809.        =XXXXXX XXXXX   XXXXX      CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  2810.        12345678901234567890123456789012345678901234567890123456789012345
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.                                  Page 43
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.        Here is how we use the various fields:
  2842.  
  2843.        NAME: Routine Name and a 1-Line description of the routine.
  2844.  
  2845.        CATEGORY: General grouping  (eg; MATH, CLKUTL, MEM, etc;)
  2846.  
  2847.        ABSTRACT: Purpose of the routine, with perhaps minimal
  2848.                  details regarding how it does it.
  2849.  
  2850.        ENTRY:    Exactly what CPU entry conditions must be satisfied.
  2851.                  Sometimes worthwhile mentioning other required
  2852.                  conditions as well (eg; RAM values, Timer State,
  2853.                  interrupts disabled, etc.).
  2854.  
  2855.        EXIT:     What conditions can be depended upon for a normal
  2856.                  (non error) exit (Eg; where are the results?  Does
  2857.                  the routine always exit CC? Is there a particular
  2858.                  value in P?  What about HEX/DEC Mode?)
  2859.  
  2860.        ERROR EXITS: Same as EXIT, but for the error exits.
  2861.  
  2862.        ALTERS:   What does the routine change (WORST CASE!) for
  2863.                  a non-error exit.  If no RAM is altered, eliminate
  2864.                  that line and just list all CPU registers altered.
  2865.                  This includes CARRY, P, MODE, SB, etc.  The caller
  2866.                  generally doesn't care what resources you use,
  2867.                  just what you may have altered.  So, do not list
  2868.                  resources used, but always restored to their entry
  2869.                  state before exit.
  2870.  
  2871.        CALLS:    Names of the routines called before exit back to
  2872.                  the caller.  It is often useful to indicate the
  2873.                  stack levels of the called routine here as well.
  2874.                  This assists in filling out the Stack Levels field.
  2875.  
  2876.        STACK LEVELS: The number of stack levels used by this
  2877.                  routine.  If this routine has no GOSUB's, and does
  2878.                  not employ C=RSTK or RSTK=C, then this will be 0.
  2879.  
  2880.        NOTES:    The place for additional documentation, perhaps
  2881.                  an algorithm description, or certain CAVEATS.
  2882.  
  2883.        HISTORY:  Indicate date, programmers initials, and
  2884.                  reason for changes.  Don't start really using
  2885.                  this until you feel the code is stable.
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.                                  Page 44
  2901.  
  2902.  
  2903.  
  2904.  
  2905.        7.5.3  Some_Header_Examples
  2906.  
  2907.  
  2908.        *****************************************************************
  2909.        *****************************************************************
  2910.        ** Name(S): PKDATE   - Pack Date Components  (YYYYMMDD order)
  2911.        **
  2912.        ** Category: DATEUTL
  2913.        **
  2914.        ** Purpose:  Facilitates storage of date components in a single
  2915.        **    CPU register.  Also useful for comparing two dates to
  2916.        **    determine which occurrs first in time.  Entry conditions
  2917.        **    are designed so that this routine may easily be called
  2918.        **    after CKDATE.
  2919.        **
  2920.        ** Entry:  A[A]: 0YYYY
  2921.        **         B[B]: MM
  2922.        **         D[B]: DD
  2923.        **
  2924.        ** Exit:   C: 00000000YYYYMMDD;  CC;  P=7
  2925.        **
  2926.        ** Alters:   C;  P;  CARRY
  2927.        **
  2928.        ** Calls:    None
  2929.        **
  2930.        ** Stack Levels: 0
  2931.        **
  2932.        ** Notes:
  2933.        **
  2934.        **     Date     Prog             Modification
  2935.        **   --------   ----   ------------------------------------------
  2936.        **   08/23/85   SB     Implemented.
  2937.        *****************************************************************
  2938.        *****************************************************************
  2939.        =PKDATE C=0    W              Initialize Result
  2940.                C=A    A              Copy YYYY and shift left twice
  2941.                CSL    A
  2942.                P=     7
  2943.                CSL    WP
  2944.                C=B    B              Copy MM and shift left twice
  2945.                CSL    WP
  2946.                CSL    WP
  2947.                C=D    B              C: 00000000YYYYMMDD
  2948.                RTNCC
  2949.        *****************************************************************
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.                                  Page 45
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.                EJECT
  2974.        *****************************************************************
  2975.        *****************************************************************
  2976.        ** Name(S): LEAPYR?  - Determine if specified year is leap yr.
  2977.        **
  2978.        ** Category: DATEUTL
  2979.        **
  2980.        ** Purpose:  Determine if specified year is a leap year.
  2981.        **
  2982.        ** Entry:    A[A]: YYYY;   DEC Mode.
  2983.        **
  2984.        ** Exit:     CS - YYYY is a Leap Year
  2985.        **           CC - YYYY is not a Leap Year
  2986.        **
  2987.        ** Alters:   C[A];  SB;  Carry
  2988.        **
  2989.        ** Calls:    None
  2990.        **
  2991.        ** Stack Levels: 1
  2992.        **
  2993.        ** Notes:  Y is a leap year iff both of the following:
  2994.        **                   1)  Y MOD 4 = 0
  2995.        **          -AND-    2)  (Y MOD 100 # 0) or (Y MOD 400 =0)
  2996.        **
  2997.        **     Date     Prog             Modification
  2998.        **   --------   ----   ------------------------------------------
  2999.        **   07/12/85   SB     Implemented.
  3000.        *****************************************************************
  3001.        *****************************************************************
  3002.        =LEAPYR?
  3003.                C=A    A              Init X=Y
  3004.                RSTK=C                Save Y
  3005.                  ?A#0   B            Y divisible by 100 ?
  3006.                  GOYES  LEAP10       No.  Leap yr iff X div by 4
  3007.                  ASR    A            Yes. Leap yr iff Y div by 400
  3008.                  ASR    A
  3009.                  C=A    A            C[A]=A[A]: X=Y/100
  3010.  
  3011.        *  Reduced to testing whether X divisible by 4.
  3012.        LEAP10    SB=0                Init SB=0
  3013.                  C=C+C  A
  3014.                  C=C+C  A
  3015.                  C=C+A  A            5*X
  3016.                  CSR    A            C[A]: X/2;   Sets SB if X odd.
  3017.                  CSRB                Set SB if X/2 odd
  3018.                C=RSTK
  3019.                A=C    A              Restore Y
  3020.                ?SB=0                 Leap Year?
  3021.                RTNYES                Yes.  CS
  3022.                RTN                   No.   CC
  3023.        *****************************************************************
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.                                  Page 46
  3033.  
  3034.  
  3035.  
  3036.  
  3037.                EJECT
  3038.        *****************************************************************
  3039.        *****************************************************************
  3040.        **
  3041.        *R Name: Ticks>DOW - Make Day of Week from Time in Ticks
  3042.        **
  3043.        ** Category:   TIMESYS
  3044.        **
  3045.        ** Abstract:   From Time in Ticks (since 0), return a real number
  3046.        **             integer (1-7) that identifies the day of week.
  3047.        **
  3048.        ** Stack:  hxs  --> % (Day of Week)
  3049.        **
  3050.        ** Error Exits:    Insufficient Memory
  3051.        **
  3052.        **     Date     Prog             Modification
  3053.        **   --------   ----   ------------------------------------------
  3054.        **   03/18/88   SB     Implemented.
  3055.        **===============================================================
  3056.        =Ticks>DOW
  3057.                CON(5) (*)+5
  3058.  
  3059.        * Pop Time(ticks) from stack
  3060.                A=DAT1 A
  3061.                AD1EX                Save D1* in A[A];  D1:->hxs
  3062.                D1=D1+ 10            Skip over prologue and length
  3063.                C=0    W
  3064.                C=DAT1 13
  3065.                R0=C                 R0: Time (Ticks)
  3066.                D1=A                 Restore D1
  3067.                D1=D1+ 5
  3068.                D=D+1  A             Pop hxs and save new pointers
  3069.                GOSBVL =SAVPTR
  3070.  
  3071.        * Convert to Day of Week and put in float form
  3072.                C=R0
  3073.                GOSBVL =dowutil      A: Day of Week Index (1-7)
  3074.                C=A    A
  3075.                P=C    0
  3076.                C=0    W
  3077.                C=P    14
  3078.                A=C    W             A: % (DOW: 1-7; 1=SUN)
  3079.  
  3080.        *  Push % on stack and loop.
  3081.                GOTO   push%lp
  3082.        *****************************************************************
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.                                  Page 47
  3099.  
  3100.  
  3101.  
  3102.  
  3103.        8.  Mnemonic Dictionary
  3104.  
  3105.        This section contains a description of each Saturn assembler
  3106.        instruction or pseudo-op.  The description shows the binary
  3107.        opcode generated by the mnemonic, if any, as well as the
  3108.        execution cycle time required if the mnemonic is an
  3109.        executable instruction.
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.        ?A#0   fs  -  Test for A not equal to 0
  3116.        ---------
  3117.        fs = A                       opcode:  8ACyy
  3118.                                     cycles:   13 + d (GO/RTNYES)
  3119.                                                6 + d (NO)
  3120.  
  3121.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9aCyy
  3122.                                     cycles:   13 + d (GO/RTNYES)
  3123.                                                6 + d (NO)
  3124.  
  3125.        Test whether the fs field of A is not equal to 0. Must be
  3126.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3127.        the following RTNYES or GOYES.  Adjusts Carry.
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.        ?A#B   fs  -  Test for A not equal to B
  3134.        ---------
  3135.        fs = A                       opcode:  8A4yy
  3136.                                     cycles:   13 + d (GO/RTNYES)
  3137.                                                6 + d (NO)
  3138.  
  3139.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a4yy
  3140.                                     cycles:   13 + d (GO/RTNYES)
  3141.                                                6 + d (NO)
  3142.  
  3143.        Test whether the fs field of A is not equal to the fs field
  3144.        of B. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3145.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.                                  Page 48
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.        ?A#C   fs  -  Test for A not equal to C
  3172.        ---------
  3173.        fs = A                       opcode:  8A6yy
  3174.                                     cycles:   13 + d (GO/RTNYES)
  3175.                                                6 + d (NO)
  3176.  
  3177.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a6yy
  3178.                                     cycles:   13 + d (GO/RTNYES)
  3179.                                                6 + d (NO)
  3180.  
  3181.        Test whether the fs field of A is not equal to the fs field
  3182.        of C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3183.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.        ?A<=B  fs  -  Test for A less than or equal to B
  3190.        ---------
  3191.        fs = A                       opcode:  8BCyy
  3192.                                     cycles:   13 + d (GO/RTNYES)
  3193.                                                6 + d (NO)
  3194.  
  3195.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9bCyy
  3196.                                     cycles:   13 + d (GO/RTNYES)
  3197.                                                6 + d (NO)
  3198.  
  3199.        Test whether the fs field of A is less than or equal to the
  3200.        fs field of B.  Must be followed by a GOYES or RTNYES
  3201.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3202.        Adjusts Carry.
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.        ?A<B   fs  -  Test for A less than B
  3209.        ---------
  3210.        fs = A                       opcode:  8B4yy
  3211.                                     cycles:   13 + d (GO/RTNYES)
  3212.                                                6 + d (NO)
  3213.  
  3214.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b4yy
  3215.                                     cycles:   13 + d (GO/RTNYES)
  3216.                                                6 + d (NO)
  3217.  
  3218.        Test whether the fs field of A is less than the fs field of
  3219.        B.  Must be followed by a GOYES or RTNYES mnemonic. yy is
  3220.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.                                  Page 49
  3231.  
  3232.  
  3233.  
  3234.  
  3235.        ?A=0   fs  -  Test for A equal to 0
  3236.        ---------
  3237.        fs = A                       opcode:  8A8yy
  3238.                                     cycles:   13 + d (GO/RTNYES)
  3239.                                                6 + d (NO)
  3240.  
  3241.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a8yy
  3242.                                     cycles:   13 + d (GO/RTNYES)
  3243.                                                6 + d (NO)
  3244.  
  3245.        Test whether the fs field of A is equal to 0. Must be
  3246.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3247.        the following RTNYES or GOYES.  Adjusts Carry.
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.        ?A=B   fs  -  Test for A equal to B
  3254.        ---------
  3255.        fs = A                       opcode:  8A0yy
  3256.                                     cycles:   13 + d (GO/RTNYES)
  3257.                                                6 + d (NO)
  3258.  
  3259.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a0yy
  3260.                                     cycles:   13 + d (GO/RTNYES)
  3261.                                                6 + d (NO)
  3262.  
  3263.        Test whether the fs field of A is equal to the fs field of
  3264.        B. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3265.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.        ?A=C   fs  -  Test for A equal to C
  3272.        ---------
  3273.        fs = A                       opcode:  8A2yy
  3274.                                     cycles:   13 + d (GO/RTNYES)
  3275.                                                6 + d (NO)
  3276.  
  3277.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a2yy
  3278.                                     cycles:   13 + d (GO/RTNYES)
  3279.                                                6 + d (NO)
  3280.  
  3281.        Test whether the fs field of A is equal to the fs field of
  3282.        C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3283.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.                                  Page 50
  3297.  
  3298.  
  3299.  
  3300.  
  3301.        ?A>=B  fs  -  Test for A greater than or equal to B
  3302.        ---------
  3303.        fs = A                       opcode:  8B8yy
  3304.                                     cycles:   13 + d (GO/RTNYES)
  3305.                                                6 + d (NO)
  3306.  
  3307.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b8yy
  3308.                                     cycles:   13 + d (GO/RTNYES)
  3309.                                                6 + d (NO)
  3310.  
  3311.        Test whether the fs field of A is greater than or equal to
  3312.        the fs field of B. Must be followed by a GOYES or RTNYES
  3313.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3314.        Adjusts Carry.
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.        ?A>B   fs  -  Test for A greater than B
  3321.        ---------
  3322.        fs = A                       opcode:  8B0yy
  3323.                                     cycles:   13 + d (GO/RTNYES)
  3324.                                                6 + d (NO)
  3325.  
  3326.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b0yy
  3327.                                     cycles:   13 + d (GO/RTNYES)
  3328.                                                6 + d (NO)
  3329.  
  3330.        Test whether the fs field of A is greater than the fs field
  3331.        of B. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3332.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.        ?B#0   fs  -  Test for B not equal to 0
  3339.        ---------
  3340.        fs = A                       opcode:  8ADyy
  3341.                                     cycles:   13 + d (GO/RTNYES)
  3342.                                                6 + d (NO)
  3343.  
  3344.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9aDyy
  3345.                                     cycles:   13 + d (GO/RTNYES)
  3346.                                                6 + d (NO)
  3347.  
  3348.        Test whether the fs field of B is not equal to 0. Must be
  3349.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3350.        the following RTNYES or GOYES.  Adjusts Carry.
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.                                  Page 51
  3363.  
  3364.  
  3365.  
  3366.  
  3367.        ?B#A   fs  -  Test for B not equal to A
  3368.        ---------
  3369.        fs = A                       opcode:  8A4yy
  3370.                                     cycles:   13 + d (GO/RTNYES)
  3371.                                                6 + d (NO)
  3372.  
  3373.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a4yy
  3374.                                     cycles:   13 + d (GO/RTNYES)
  3375.                                                6 + d (NO)
  3376.  
  3377.        Test whether the fs field of B is not equal to the fs field
  3378.        of A. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3379.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.        ?B#C   fs  -  Test for B not equal to C
  3386.        ---------
  3387.        fs = A                       opcode:  8A5yy
  3388.                                     cycles:   13 + d (GO/RTNYES)
  3389.                                                6 + d (NO)
  3390.  
  3391.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a5yy
  3392.                                     cycles:   13 + d (GO/RTNYES)
  3393.                                                6 + d (NO)
  3394.  
  3395.        Test whether the fs field of B is not equal to the fs field
  3396.        of C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3397.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.                                  Page 52
  3429.  
  3430.  
  3431.  
  3432.  
  3433.        ?B<=C  fs  -  Test for B less than or equal to C
  3434.        ---------
  3435.        fs = A                       opcode:  8BDyy
  3436.                                     cycles:   13 + d (GO/RTNYES)
  3437.                                                6 + d (NO)
  3438.  
  3439.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9bDyy
  3440.                                     cycles:   13 + d (GO/RTNYES)
  3441.                                                6 + d (NO)
  3442.  
  3443.        Test whether the fs field of B is less than or equal to the
  3444.        fs field of C.  Must be followed by a GOYES or RTNYES
  3445.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3446.        Adjusts Carry.
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.        ?B<C   fs  -  Test for B less than C
  3453.        ---------
  3454.        fs = A                       opcode:  8B5yy
  3455.                                     cycles:   13 + d (GO/RTNYES)
  3456.                                                6 + d (NO)
  3457.  
  3458.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b5yy
  3459.                                     cycles:   13 + d (GO/RTNYES)
  3460.                                                6 + d (NO)
  3461.  
  3462.        Test whether the fs field of B is less than the fs field of
  3463.        C.  Must be followed by a GOYES or RTNYES mnemonic. yy is
  3464.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.        ?B=0   fs  -  Test for B equal to 0
  3471.        ---------
  3472.        fs = A                       opcode:  8A9yy
  3473.                                     cycles:   13 + d (GO/RTNYES)
  3474.                                                6 + d (NO)
  3475.  
  3476.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a9yy
  3477.                                     cycles:   13 + d (GO/RTNYES)
  3478.                                                6 + d (NO)
  3479.  
  3480.        Test whether the fs field of B is equal to 0. Must be
  3481.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3482.        the following RTNYES or GOYES.  Adjusts Carry.
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.                                  Page 53
  3495.  
  3496.  
  3497.  
  3498.  
  3499.        ?B=A   fs  -  Test for B equal to A
  3500.        ---------
  3501.        fs = A                       opcode:  8A0yy
  3502.                                     cycles:   13 + d (GO/RTNYES)
  3503.                                                6 + d (NO)
  3504.  
  3505.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a0yy
  3506.                                     cycles:   13 + d (GO/RTNYES)
  3507.                                                6 + d (NO)
  3508.  
  3509.        Test whether the fs field of B is equal to the fs field of
  3510.        A. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3511.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.        ?B=C   fs  -  Test for B equal to C
  3518.        ---------
  3519.        fs = A                       opcode:  8A1yy
  3520.                                     cycles:   13 + d (GO/RTNYES)
  3521.                                                6 + d (NO)
  3522.  
  3523.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a1yy
  3524.                                     cycles:   13 + d (GO/RTNYES)
  3525.                                                6 + d (NO)
  3526.  
  3527.        Test whether the fs field of B is equal to the fs field of
  3528.        C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3529.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.        ?B>=C  fs  -  Test for B greater than or equal to C
  3536.        ---------
  3537.        fs = A                       opcode:  8B9yy
  3538.                                     cycles:   13 + d (GO/RTNYES)
  3539.                                                6 + d (NO)
  3540.  
  3541.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b9yy
  3542.                                     cycles:   13 + d (GO/RTNYES)
  3543.                                                6 + d (NO)
  3544.  
  3545.        Test whether the fs field of B is greater than or equal to
  3546.        the fs field of C. Must be followed by a GOYES or RTNYES
  3547.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3548.        Adjusts Carry.
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.                                  Page 54
  3561.  
  3562.  
  3563.  
  3564.  
  3565.        ?B>C   fs  -  Test for B greater than C
  3566.        ---------
  3567.        fs = A                       opcode:  8B1yy
  3568.                                     cycles:   13 + d (GO/RTNYES)
  3569.                                                6 + d (NO)
  3570.  
  3571.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b1yy
  3572.                                     cycles:   13 + d (GO/RTNYES)
  3573.                                                6 + d (NO)
  3574.  
  3575.        Test whether the fs field of B is greater than the fs field
  3576.        of C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3577.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.        ?C#0   fs  -  Test for C not equal to 0
  3584.        ---------
  3585.        fs = A                       opcode:  8AEyy
  3586.                                     cycles:   13 + d (GO/RTNYES)
  3587.                                                6 + d (NO)
  3588.  
  3589.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9aEyy
  3590.                                     cycles:   13 + d (GO/RTNYES)
  3591.                                                6 + d (NO)
  3592.  
  3593.        Test whether the fs field of C is not equal to 0. Must be
  3594.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3595.        the following RTNYES or GOYES.  Adjusts Carry.
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.        ?C#A   fs  -  Test for C not equal to A
  3602.        ---------
  3603.        fs = A                       opcode:  8A6yy
  3604.                                     cycles:   13 + d (GO/RTNYES)
  3605.                                                6 + d (NO)
  3606.  
  3607.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a6yy
  3608.                                     cycles:   13 + d (GO/RTNYES)
  3609.                                                6 + d (NO)
  3610.  
  3611.        Test whether the fs field of C is not equal to the fs field
  3612.        of A. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3613.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.                                  Page 55
  3627.  
  3628.  
  3629.  
  3630.  
  3631.        ?C#B   fs  -  Test for C not equal to B
  3632.        ---------
  3633.        fs = A                       opcode:  8A5yy
  3634.                                     cycles:   13 + d (GO/RTNYES)
  3635.                                                6 + d (NO)
  3636.  
  3637.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a5yy
  3638.                                     cycles:   13 + d (GO/RTNYES)
  3639.                                                6 + d (NO)
  3640.  
  3641.        Test whether the fs field of C is not equal to the fs field
  3642.        of B. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3643.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.        ?C#D   fs  -  Test for C not equal to D
  3650.        ---------
  3651.        fs = A                       opcode:  8A7yy
  3652.                                     cycles:   13 + d (GO/RTNYES)
  3653.                                                6 + d (NO)
  3654.  
  3655.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a7yy
  3656.                                     cycles:   13 + d (GO/RTNYES)
  3657.                                                6 + d (NO)
  3658.  
  3659.        Test whether the fs field of C is not equal to the fs field
  3660.        of D. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3661.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.        ?C<=A  fs  -  Test for C less than or equal to A
  3668.        ---------
  3669.        fs = A                       opcode:  8BEyy
  3670.                                     cycles:   13 + d (GO/RTNYES)
  3671.                                                6 + d (NO)
  3672.  
  3673.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9bEyy
  3674.                                     cycles:   13 + d (GO/RTNYES)
  3675.                                                6 + d (NO)
  3676.  
  3677.        Test whether the fs field of C is less than or equal to the
  3678.        fs field of A.  Must be followed by a GOYES or RTNYES
  3679.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3680.        Adjusts Carry.
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.                                  Page 56
  3693.  
  3694.  
  3695.  
  3696.  
  3697.        ?C<A   fs  -  Test for C less than A
  3698.        ---------
  3699.        fs = A                       opcode:  8B6yy
  3700.                                     cycles:   13 + d (GO/RTNYES)
  3701.                                                6 + d (NO)
  3702.  
  3703.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b6yy
  3704.                                     cycles:   13 + d (GO/RTNYES)
  3705.                                                6 + d (NO)
  3706.  
  3707.        Test whether the fs field of C is less than the fs field of
  3708.        A.  Must be followed by a GOYES or RTNYES mnemonic. yy is
  3709.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.        ?C=0   fs  -  Test for C equal to 0
  3716.        ---------
  3717.        fs = A                       opcode:  8AAyy
  3718.                                     cycles:   13 + d (GO/RTNYES)
  3719.                                                6 + d (NO)
  3720.  
  3721.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9aAyy
  3722.                                     cycles:   13 + d (GO/RTNYES)
  3723.                                                6 + d (NO)
  3724.  
  3725.        Test whether the fs field of C is equal to 0. Must be
  3726.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3727.        the following RTNYES or GOYES.  Adjusts Carry.
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.        ?C=A   fs  -  Test for C equal to A
  3734.        ---------
  3735.        fs = A                       opcode:  8A2yy
  3736.                                     cycles:   13 + d (GO/RTNYES)
  3737.                                                6 + d (NO)
  3738.  
  3739.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a2yy
  3740.                                     cycles:   13 + d (GO/RTNYES)
  3741.                                                6 + d (NO)
  3742.  
  3743.        Test whether the fs field of C is equal to the fs field of
  3744.        A. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3745.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.                                  Page 57
  3759.  
  3760.  
  3761.  
  3762.  
  3763.        ?C=B   fs  -  Test for C equal to B
  3764.        ---------
  3765.        fs = A                       opcode:  8A1yy
  3766.                                     cycles:   13 + d (GO/RTNYES)
  3767.                                                6 + d (NO)
  3768.  
  3769.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a1yy
  3770.                                     cycles:   13 + d (GO/RTNYES)
  3771.                                                6 + d (NO)
  3772.  
  3773.        Test whether the fs field of C is equal to the fs field of
  3774.        B. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3775.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.        ?C=D   fs  -  Test for C equal to D
  3782.        ---------
  3783.        fs = A                       opcode:  8A3yy
  3784.                                     cycles:   13 + d (GO/RTNYES)
  3785.                                                6 + d (NO)
  3786.  
  3787.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a3yy
  3788.                                     cycles:   13 + d (GO/RTNYES)
  3789.                                                6 + d (NO)
  3790.  
  3791.        Test whether the fs field of C is equal to the fs field of
  3792.        D. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3793.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.        ?C>=A  fs  -  Test for C greater than or equal to A
  3800.        ---------
  3801.        fs = A                       opcode:  8BAyy
  3802.                                     cycles:   13 + d (GO/RTNYES)
  3803.                                                6 + d (NO)
  3804.  
  3805.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9bAyy
  3806.                                     cycles:   13 + d (GO/RTNYES)
  3807.                                                6 + d (NO)
  3808.  
  3809.        Test whether the fs field of C is greater than or equal to
  3810.        the fs field of A. Must be followed by a GOYES or RTNYES
  3811.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3812.        Adjusts Carry.
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.                                  Page 58
  3825.  
  3826.  
  3827.  
  3828.  
  3829.        ?C>A   fs  -  Test for C greater than A
  3830.        ---------
  3831.        fs = A                       opcode:  8B2yy
  3832.                                     cycles:   13 + d (GO/RTNYES)
  3833.                                                6 + d (NO)
  3834.  
  3835.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b2yy
  3836.                                     cycles:   13 + d (GO/RTNYES)
  3837.                                                6 + d (NO)
  3838.  
  3839.        Test whether the fs field of C is greater than the fs field
  3840.        of A. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3841.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.        ?D#0   fs  -  Test for D not equal to 0
  3848.        ---------
  3849.        fs = A                       opcode:  8AFyy
  3850.                                     cycles:   13 + d (GO/RTNYES)
  3851.                                                6 + d (NO)
  3852.  
  3853.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9aFyy
  3854.                                     cycles:   13 + d (GO/RTNYES)
  3855.                                                6 + d (NO)
  3856.  
  3857.        Test whether the fs field of D is not equal to 0. Must be
  3858.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3859.        the following RTNYES or GOYES.  Adjusts Carry.
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.        ?D#C   fs  -  Test for D not equal to C
  3866.        ---------
  3867.        fs = A                       opcode:  8A7yy
  3868.                                     cycles:   13 + d (GO/RTNYES)
  3869.                                                6 + d (NO)
  3870.  
  3871.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a7yy
  3872.                                     cycles:   13 + d (GO/RTNYES)
  3873.                                                6 + d (NO)
  3874.  
  3875.        Test whether the fs field of D is not equal to the fs field
  3876.        of C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3877.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.                                  Page 59
  3891.  
  3892.  
  3893.  
  3894.  
  3895.        ?D<=C  fs  -  Test for D less than or equal to C
  3896.        ---------
  3897.        fs = A                       opcode:  8BFyy
  3898.                                     cycles:   13 + d (GO/RTNYES)
  3899.                                                6 + d (NO)
  3900.  
  3901.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9bFyy
  3902.                                     cycles:   13 + d (GO/RTNYES)
  3903.                                                6 + d (NO)
  3904.  
  3905.        Test whether the fs field of D is less than or equal to the
  3906.        fs field of C.  Must be followed by a GOYES or RTNYES
  3907.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3908.        Adjusts Carry.
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.        ?D<C   fs  -  Test for D less than to C
  3915.        ---------
  3916.        fs = A                       opcode:  8B7yy
  3917.                                     cycles:   13 + d (GO/RTNYES)
  3918.                                                6 + d (NO)
  3919.  
  3920.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b7yy
  3921.                                     cycles:   13 + d (GO/RTNYES)
  3922.                                                6 + d (NO)
  3923.  
  3924.        Test whether the fs field of D is less than the fs field of
  3925.        C.  Must be followed by a GOYES or RTNYES mnemonic. yy is
  3926.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.        ?D=0   fs  -  Test for D equal to 0
  3933.        ---------
  3934.        fs = A                       opcode:  8AByy
  3935.                                     cycles:   13 + d (GO/RTNYES)
  3936.                                                6 + d (NO)
  3937.  
  3938.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9aByy
  3939.                                     cycles:   13 + d (GO/RTNYES)
  3940.                                                6 + d (NO)
  3941.  
  3942.        Test whether the fs field of D is equal to 0. Must be
  3943.        followed by a GOYES or RTNYES mnemonic. yy is determined by
  3944.        the following RTNYES or GOYES.  Adjusts Carry.
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.                                  Page 60
  3957.  
  3958.  
  3959.  
  3960.  
  3961.        ?D=C   fs  -  Test for D equal to C
  3962.        ---------
  3963.        fs = A                       opcode:  8A3yy
  3964.                                     cycles:   13 + d (GO/RTNYES)
  3965.                                                6 + d (NO)
  3966.  
  3967.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9a3yy
  3968.                                     cycles:   13 + d (GO/RTNYES)
  3969.                                                6 + d (NO)
  3970.  
  3971.        Test whether the fs field of D is equal to the fs field of
  3972.        C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  3973.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.        ?D>=C  fs  -  Test for D greater than or equal to C
  3980.        ---------
  3981.        fs = A                       opcode:  8BByy
  3982.                                     cycles:   13 + d (GO/RTNYES)
  3983.                                                6 + d (NO)
  3984.  
  3985.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9bByy
  3986.                                     cycles:   13 + d (GO/RTNYES)
  3987.                                                6 + d (NO)
  3988.  
  3989.        Test whether the fs field of D is greater than or equal to
  3990.        the fs field of C. Must be followed by a GOYES or RTNYES
  3991.        mnemonic. yy is determined by the following RTNYES or GOYES.
  3992.        Adjusts Carry.
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.        ?D>C   fs  -  Test for D greater than C
  3999.        ---------
  4000.        fs = A                       opcode:  8B3yy
  4001.                                     cycles:   13 + d (GO/RTNYES)
  4002.                                                6 + d (NO)
  4003.  
  4004.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  9b3yy
  4005.                                     cycles:   13 + d (GO/RTNYES)
  4006.                                                6 + d (NO)
  4007.  
  4008.        Test whether the fs field of D is greater than the fs field
  4009.        of C. Must be followed by a GOYES or RTNYES mnemonic. yy is
  4010.        determined by the following RTNYES or GOYES.  Adjusts Carry.
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.                                  Page 61
  4023.  
  4024.  
  4025.  
  4026.  
  4027.        ?MP=0    - Test Module Pulled bit (MP)
  4028.        ---------
  4029.                                     opcode:  838yy
  4030.                                     cycles:   13 (GO/RTNYES)
  4031.                                                6 (NO)
  4032.  
  4033.        Test whether the Module Pulled bit (MP) is zero.  This
  4034.        hardware status bit is set whenever a module-pulled
  4035.        interrupt occurs (the *INT line of the CPU is pulled high),
  4036.        and must be explictly cleared by the MP=0 mnemonic. See the
  4037.        "HP-71 Hardware Specification" for more information.  Must
  4038.        be followed by a RTNYES or GOYES mnemonic. yy is determined
  4039.        by the following RTNYES or GOYES.  Adjusts Carry.
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.        ?P#   n    - Test if P pointer not equal to n
  4046.        ---------
  4047.                                     opcode:  88nyy
  4048.                                     cycles:   13 (GO/RTNYES)
  4049.                                                6 (NO)
  4050.  
  4051.        Test whether the P pointer is not equal to n. Must be
  4052.        followed by a RTNYES or GOYES mnemonic. yy is determined by
  4053.        the following RTNYES or GOYES.  Adjusts Carry.
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.        ?P=    n    - Test if P pointer is equal to n
  4060.        ---------
  4061.                                     opcode:  89nyy
  4062.                                     cycles:   13 (GO/RTNYES)
  4063.                                                6 (NO)
  4064.  
  4065.        Test whether the P pointer is equal to n. Must be followed
  4066.        by a RTNYES or GOYES mnemonic. yy is determined by the
  4067.        following RTNYES or GOYES.  Adjusts Carry.
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.        ?SB=0    - Test Sticky Bit (SB)
  4074.        ---------
  4075.                                     opcode:  832yy
  4076.                                     cycles:   13 (GO/RTNYES)
  4077.                                                6 (NO)
  4078.  
  4079.        Test whether the Sticky Bit (SB) is zero. This hardware
  4080.        status bit is set on right shifts when a non-zero nibble or
  4081.        bit is shifted off the end of the field.  The Sticky Bit
  4082.        must be cleared explicitly. Must be followed by a RTNYES or
  4083.        GOYES mnemonic. yy is determined by the following RTNYES or
  4084.        GOYES.  Adjusts Carry.
  4085.  
  4086.  
  4087.  
  4088.                                  Page 62
  4089.  
  4090.  
  4091.  
  4092.  
  4093.        ?SR=0    - Test Service Request bit (SR) for zero
  4094.        ---------
  4095.                                     opcode:  834yy
  4096.                                     cycles:   13 (GO/RTNYES)
  4097.                                                6 (NO)
  4098.  
  4099.        Test whether the Service Request bit (SR) is zero.  This
  4100.        hardware status bit is set by the SREQ? mnemonic, and must
  4101.        be cleared explicitly by the SR=0 instruciton.  Must be
  4102.        followed by a RTNYES or GOYES mnemonic. yy is determined by
  4103.        the following RTNYES or GOYES.  Adjusts Carry.
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.        ?ST#0   n   - Test status bit n not equal to 0
  4110.        ---------
  4111.                                     opcode:  87nyy
  4112.                                     cycles:   14 (GO/RTNYES)
  4113.                                                7 (NO)
  4114.  
  4115.        Test whether Program Status bit n is set. Must be followed
  4116.        by a RTNYES or GOYES mnemonic. yy is determined by the
  4117.        following RTNYES or GOYES.  Adjusts Carry.
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.        ?ST#1   n   - Test status bit n not equal to 1
  4124.        ---------
  4125.                                     opcode:  86nyy
  4126.                                     cycles:   14 (GO/RTNYES)
  4127.                                                7 (NO)
  4128.  
  4129.        Test whether Program Status bit n is clear. Must be followed
  4130.        by a RTNYES or GOYES mnemonic. yy is determined by the
  4131.        following RTNYES or GOYES.  Adjusts Carry.
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.        ?ST=0  n   - Test status bit n equal to 0
  4138.        ---------
  4139.                                     opcode:  86nyy
  4140.                                     cycles:   14 (GO/RTNYES)
  4141.                                                7 (NO)
  4142.  
  4143.        Test whether Program Status bit n is clear. Must be followed
  4144.        by a RTNYES or GOYES mnemonic. yy is determined by the
  4145.        following RTNYES or GOYES.  Adjusts Carry.
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.                                  Page 63
  4155.  
  4156.  
  4157.  
  4158.  
  4159.        ?ST=1  n   - Test status bit n equal to 1
  4160.        ---------
  4161.                                     opcode:  87nyy
  4162.                                     cycles:   14 (GO/RTNYES)
  4163.                                                7 (NO)
  4164.  
  4165.        Test whether Program Status bit n is set. Must be followed
  4166.        by a RTNYES or GOYES mnemonic. yy is determined by the
  4167.        following RTNYES or GOYES.  Adjusts Carry.
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.        ?XM=0    - Test External Module Missing bit (XM)
  4174.        ---------
  4175.                                     opcode:  831yy
  4176.                                     cycles:   13 (GO/RTNYES)
  4177.                                                6 (NO)
  4178.  
  4179.        Test the whether the External Module Missing bit (XM) is
  4180.        zero.  This hardware status bit is set by the RTNSXM
  4181.        mnemonic, and must be explicitly cleared by the XM=0
  4182.        mnemonic.  Must be followed by a RTNYES or GOYES mnemonic.
  4183.        yy is determined by the following RTNYES or GOYES.  Adjusts
  4184.        Carry.
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.        A=-A   fs  -  Two's complement of A into A
  4191.        ---------
  4192.        fs = A                       opcode:  F8
  4193.                                     cycles:    7
  4194.  
  4195.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb8
  4196.                                     cycles:    3 + d
  4197.  
  4198.        Complement the specified fs field of A. Complement is two's
  4199.        complement if in HEX mode, ten's complement if in DEC mode.
  4200.        Carry is set if the field is not zero, else Carry is
  4201.        cleared.
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.        A=-A-1 fs  -  One's complement of A into A
  4208.        ---------
  4209.        fs = A                       opcode:  FC
  4210.                                     cycles:    7
  4211.  
  4212.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BbC
  4213.                                     cycles:    3 + d
  4214.  
  4215.        Perform a one's complement on the specified fs field of A.
  4216.        Carry is always cleared.
  4217.  
  4218.  
  4219.  
  4220.                                  Page 64
  4221.  
  4222.  
  4223.  
  4224.  
  4225.        A=0    fs  -  Set A equal to 0
  4226.        ---------
  4227.        fs = A                       opcode:  D0
  4228.                                     cycles:    7
  4229.  
  4230.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab0
  4231.                                     cycles:    3 + d
  4232.  
  4233.        Set the specified fs field of A to zero.  Carry is not
  4234.        affected.
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.        A=A!B  fs  -  A OR B into A
  4241.        ---------
  4242.        fs = A                       opcode:  0EF8
  4243.                                     cycles:    4 + d
  4244.  
  4245.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea8
  4246.                                     cycles:    4 + d
  4247.  
  4248.        Set the fs field of register A to its logical OR with the
  4249.        corresponding field of register B.  Carry is not affected.
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.        A=A!C  fs  -  A OR C into A
  4257.        ---------
  4258.        fs = A                       opcode:  0EFE
  4259.                                     cycles:    4 + d
  4260.  
  4261.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0EaE
  4262.                                     cycles:    4 + d
  4263.  
  4264.        Set the fs field of register A to its logical OR with the
  4265.        corresponding field of register C.  Carry is not affected.
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.        A=A&B  fs  -  A AND B into A
  4272.        ---------
  4273.        fs = A                       opcode:  0EF0
  4274.                                     cycles:    4 + d
  4275.  
  4276.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea0
  4277.                                     cycles:    4 + d
  4278.  
  4279.        Set the fs field of register A to its logical AND with the
  4280.        corresponding field of register B.  Carry is not affected.
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.                                  Page 65
  4287.  
  4288.  
  4289.  
  4290.  
  4291.        A=A&C  fs  -  A AND C into A
  4292.        ---------
  4293.        fs = A                       opcode:  0EF6
  4294.                                     cycles:    4 + d
  4295.  
  4296.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea6
  4297.                                     cycles:    4 + d
  4298.  
  4299.        Set the fs field of register A to its logical AND with the
  4300.        corresponding field of register C.  Carry is not affected.
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.        A=A+1  fs  -  Increment A
  4307.        ---------
  4308.        fs = A                       opcode:  E4
  4309.                                     cycles:    7
  4310.  
  4311.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba4
  4312.                                     cycles:    3 + d
  4313.  
  4314.        Increment the specified fs field of register A by one.
  4315.        Adjusts Carry.
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.        A=A+A  fs  -  Sum of A and A into A
  4322.        ---------
  4323.        fs = A                       opcode:  C4
  4324.                                     cycles:    7
  4325.  
  4326.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa4
  4327.                                     cycles:    3 + d
  4328.  
  4329.        Double the specified fs field of register A. Adjusts Carry.
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.        A=A+B  fs  -  Sum of A and B into A
  4336.        ---------
  4337.        fs = A                       opcode:  C0
  4338.                                     cycles:    7
  4339.  
  4340.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa0
  4341.                                     cycles:    3 + d
  4342.  
  4343.        Set the specified fs field of register A to the sum of
  4344.        itself and the corresponding field of register B. Adjusts
  4345.        Carry.
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.                                  Page 66
  4353.  
  4354.  
  4355.  
  4356.  
  4357.        A=A+C  fs  -  Sum of A and C into A
  4358.        ---------
  4359.        fs = A                       opcode:  CA
  4360.                                     cycles:    7
  4361.  
  4362.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AaA
  4363.                                     cycles:    3 + d
  4364.  
  4365.        Set the specified fs field of register A to the sum of
  4366.        itself and the corresponding field of register C. Adjusts
  4367.        Carry.
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.        A=A-1  fs  -  Decrement A
  4374.        ---------
  4375.        fs = A                       opcode:  CC
  4376.                                     cycles:    7
  4377.  
  4378.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AaC
  4379.                                     cycles:    3 + d
  4380.  
  4381.        Decrement the specified fs field of register A by one.
  4382.        Adjusts Carry.
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.        A=A-B  fs  -  A minus B into A
  4389.        ---------
  4390.        fs = A                       opcode:  E0
  4391.                                     cycles:    7
  4392.  
  4393.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba0
  4394.                                     cycles:    3 + d
  4395.  
  4396.        Set the specified fs field of register A to the difference
  4397.        between itself and the corresponding field of register B.
  4398.        Adjusts Carry.
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.        A=A-C  fs  -  A minus C into A
  4405.        ---------
  4406.        fs = A                       opcode:  EA
  4407.                                     cycles:    7
  4408.  
  4409.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BaA
  4410.                                     cycles:    3 + d
  4411.  
  4412.        Set the specified fs field of register A to the difference
  4413.        between itself and the corresponding field of register C.
  4414.        Adjusts Carry.
  4415.  
  4416.  
  4417.  
  4418.                                  Page 67
  4419.  
  4420.  
  4421.  
  4422.  
  4423.        A=B    fs  -  Copy B to A
  4424.        ---------
  4425.        fs = A                       opcode:  D4
  4426.                                     cycles:    7
  4427.  
  4428.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab4
  4429.                                     cycles:    3 + d
  4430.  
  4431.        Copy the fs field of register B into the corresponding field
  4432.        of register A. Carry is not affected.
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.        A=B-A  fs  -  B minus A into A
  4439.        ---------
  4440.        fs = A                       opcode:  EC
  4441.                                     cycles:    7
  4442.  
  4443.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BaC
  4444.                                     cycles:    3 + d
  4445.  
  4446.        Set the specified fs field of register A to the inverse
  4447.        difference between itself and the corresponding field of
  4448.        register B. Adjusts Carry.
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.        A=C    fs  -  Copy C to A
  4455.        ---------
  4456.        fs = A                       opcode:  DA
  4457.                                     cycles:    7
  4458.  
  4459.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbA
  4460.                                     cycles:    3 + d
  4461.  
  4462.        Copy the fs field of register C into the corresponding field
  4463.        of register A. Carry is not affected.
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.                                  Page 68
  4485.  
  4486.  
  4487.  
  4488.  
  4489.        A=DAT0 fsd -  Load A from memory
  4490.        ---------
  4491.        fs = A                       opcode:  142
  4492.                                     cycles:   18
  4493.  
  4494.        fs = B                       opcode:  14A
  4495.                                     cycles:   15
  4496.  
  4497.        fs = (P,WP,XS,X,S,M,W)       opcode:  152a
  4498.                                     cycles:   17 + d
  4499.  
  4500.        fs = d                       opcode:  15Ax (x=d-1)
  4501.                                     cycles:   16 + d
  4502.  
  4503.        The amount of data (d nibbles) specified by fsd will be
  4504.        transferred from the memory address pointed to by D0 into
  4505.        the specified field of register A.  The lowest-addressed
  4506.        nibble will be transferred into the lowest-order nibble of
  4507.        the register field, proceeding toward the higher-order
  4508.        nibbles. If fs = d, d nibbles are transferred into the
  4509.        register starting at nibble 0. See the section on "Loading
  4510.        Data From Memory".
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.        A=DAT1 fsd -  Load A from memory
  4517.        ---------
  4518.        fs = A                       opcode:  143
  4519.                                     cycles:   18
  4520.  
  4521.        fs = B                       opcode:  14B
  4522.                                     cycles:   15
  4523.  
  4524.        fs = (P,WP,XS,X,S,M,W)       opcode:  153a
  4525.                                     cycles:   17 + d
  4526.  
  4527.        fs = d                       opcode:  15Bx (x=d-1)
  4528.                                     cycles:   16 + d
  4529.  
  4530.        The amount of data (d nibbles) specified by fsd will be
  4531.        transferred from the memory address pointed to by D1 into
  4532.        the specified field of register A.  The lowest-addressed
  4533.        nibble will be transferred into the lowest-order nibble of
  4534.        the register field, proceeding toward the higher-order
  4535.        nibbles. If fs = d, d nibbles are transferred into the
  4536.        register starting at nibble 0. See the section on "Loading
  4537.        Data From Memory".
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.                                  Page 69
  4551.  
  4552.  
  4553.  
  4554.  
  4555.        A=IN      - Load A with IN
  4556.        ---------
  4557.                                     opcode:  802
  4558.                                     cycles:    7
  4559.  
  4560.        Load the low-order 4 nibbles of the A register with the
  4561.        contents of the Input register.
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.        A=R0      - Copy R0 to A
  4568.        ---------
  4569.                                     opcode:  110
  4570.                                     cycles:   19
  4571.  
  4572.        The contents of the scratch register R0 is copied to the
  4573.        working register A.
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.        A=R1      - Copy R1 to A
  4580.        ---------
  4581.                                     opcode:  111
  4582.                                     cycles:   19
  4583.  
  4584.        The contents of the scratch register R1 is copied to the
  4585.        working register A.
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.        A=R2      - Copy R2 to A
  4592.        ---------
  4593.                                     opcode:  112
  4594.                                     cycles:   19
  4595.  
  4596.        The contents of the scratch register R2 is copied to the
  4597.        working register A.
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.        A=R3      - Copy R3 to A
  4604.        ---------
  4605.                                     opcode:  113
  4606.                                     cycles:   19
  4607.  
  4608.        The contents of the scratch register R3 is copied to the
  4609.        working register A.
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.                                  Page 70
  4617.  
  4618.  
  4619.  
  4620.  
  4621.        A=R4      - Copy R4 to A
  4622.        ---------
  4623.                                     opcode:  114
  4624.                                     cycles:   19
  4625.  
  4626.        The contents of the scratch register R4 is copied to the
  4627.        working register A.
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.        ABEX   fs  -  Exchange Registers A and B
  4634.        ---------
  4635.        fs = A                       opcode:  DC
  4636.                                     cycles:    7
  4637.  
  4638.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbC
  4639.                                     cycles:    3 + d
  4640.  
  4641.        Exchange the fs fields of registers of A and B. Carry is not
  4642.        affected.
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.        ACEX   fs  -  Exchange Registers A and C
  4649.        ---------
  4650.        fs = A                       opcode:  DE
  4651.                                     cycles:    7
  4652.  
  4653.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbE
  4654.                                     cycles:    3 + d
  4655.  
  4656.        Exchange the fs fields of registers of A and C. Carry is not
  4657.        affected.
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.        AD0EX      - Exchange A and D0 (nibs 0-4)
  4664.        ---------
  4665.                                     opcode:  132
  4666.                                     cycles:    8
  4667.  
  4668.        Exchange the A field of register A with Data pointer D0.
  4669.        Carry is not affected.
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.                                  Page 71
  4683.  
  4684.  
  4685.  
  4686.  
  4687.        AD0XS      - Exchange A and D0 short (nibs 0-3)
  4688.        ---------
  4689.                                     opcode:  13A
  4690.                                     cycles:    7
  4691.  
  4692.        Exchange the lower 4 nibbles of A with the lower 4 nibbles
  4693.        of Data pointer D0.  Carry is not affected.
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.        AD1EX      - Exchange A and D1 (nibs 0-4)
  4700.        ---------
  4701.                                     opcode:  133
  4702.                                     cycles:    8
  4703.  
  4704.        Exchange the A field of register A with Data pointer D1.
  4705.        Carry is not affected.
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.        AD1XS      - Exchange A and D1 short (nibs 0-3)
  4712.        ---------
  4713.                                     opcode:  13B
  4714.                                     cycles:    7
  4715.  
  4716.        Exchange the lower 4 nibbles of A with the lower 4 nibbles
  4717.        of Data pointer D1.  Carry is not affected.
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.        AR0EX      - Exchange A and R0
  4724.        ---------
  4725.                                     opcode:  120
  4726.                                     cycles:   19
  4727.  
  4728.        Exchange the contents of the working register A and the
  4729.        scratch register R0.
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.        AR1EX     - Exchange A and R1
  4736.        ---------
  4737.                                     opcode:  121
  4738.                                     cycles:   19
  4739.  
  4740.        Exchange the contents of the working register A and the
  4741.        scratch register R1.
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.                                  Page 72
  4749.  
  4750.  
  4751.  
  4752.  
  4753.        AR2EX     - Exchange A and R2
  4754.        ---------
  4755.                                     opcode:  122
  4756.                                     cycles:   19
  4757.  
  4758.        Exchange the contents of the working register A and the
  4759.        scratch register R2.
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.        AR3EX     - Exchange A and R3
  4766.        ---------
  4767.                                     opcode:  123
  4768.                                     cycles:   19
  4769.  
  4770.        Exchange the contents of the working register A and the
  4771.        scratch register R3.
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.        AR4EX     - Exchange A and R4
  4778.        ---------
  4779.                                     opcode:  124
  4780.                                     cycles:   19
  4781.  
  4782.        Exchange the contents of the working register A and the
  4783.        scratch register R4.
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.        ASL    fs  -  A Shift Left
  4790.        ---------
  4791.        fs = A                       opcode:  F0
  4792.                                     cycles:    7
  4793.  
  4794.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb0
  4795.                                     cycles:    3 + d
  4796.  
  4797.        Shift the contents of the specified fs field of register A
  4798.        left one nibble, without affecting the rest of the register.
  4799.        The nibble shifted off the left end of the field is lost.
  4800.        The new low-order nibble of the field is zero. The Sticky
  4801.        Bit (SB) is not affected.
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.                                  Page 73
  4815.  
  4816.  
  4817.  
  4818.  
  4819.        ASLC      - A Shift Left Circular
  4820.        ---------
  4821.                                     opcode:  810
  4822.                                     cycles:   21
  4823.  
  4824.        Circular shift register A left one nibble.  Operates on all
  4825.        16 digits.  The Sticky Bit (SB) is not affected.
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.        ASR    fs  -  A Shift Right
  4832.        ---------
  4833.        fs = A                       opcode:  F4
  4834.                                     cycles:    7
  4835.  
  4836.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb4
  4837.                                     cycles:    3 + d
  4838.  
  4839.        Shift the contents of the specified fs field of register A
  4840.        right one nibble, without affecting the rest of the
  4841.        register. The nibble shifted off the right end of the field
  4842.        is lost, but the Sticky Bit (SB) is set if the nibble was
  4843.        non-zero.  The new high-order nibble of the field is zero.
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.        ASRB      - A Shift Right Bit
  4850.        ---------
  4851.                                     opcode:  81C
  4852.                                     cycles:   20
  4853.  
  4854.        Shift register A right one bit.  Operates on all 16 digits.
  4855.        The bit shifted off the end is lost, but the Sticky Bit (SB)
  4856.        is set if it was non-zero.  The new high-order bit of the
  4857.        register is zero.
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.        ASRC      - A Shift Right Circular
  4864.        ---------
  4865.                                     opcode:  814
  4866.                                     cycles:   21
  4867.  
  4868.        Circular shift register A right one nibble.  Operates on all
  4869.        16 digits. The Sticky Bit (SB) is set if the nibble shifted
  4870.        from low-order around to high-order position was non-zero.
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.                                  Page 74
  4881.  
  4882.  
  4883.  
  4884.  
  4885.        B=-B   fs  -  Two's complement of B into B
  4886.        ---------
  4887.        fs = A                       opcode:  F9
  4888.                                     cycles:    7
  4889.  
  4890.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb9
  4891.                                     cycles:    3 + d
  4892.  
  4893.        Complement the specified fs field of B. Complement is two's
  4894.        complement if in HEX mode, ten's complement if in DEC mode.
  4895.        Carry is set if the field is not zero, else Carry is
  4896.        cleared.
  4897.  
  4898.  
  4899.  
  4900.  
  4901.  
  4902.        B=-B-1 fs  -  One's complement of B into B
  4903.        ---------
  4904.        fs = A                       opcode:  FD
  4905.                                     cycles:    7
  4906.  
  4907.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BbD
  4908.                                     cycles:    3 + d
  4909.  
  4910.        Perform a one's complement on the specified fs field of B.
  4911.        Carry is always cleared.
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.        B=0    fs  -  Set B equal to 0
  4918.        ---------
  4919.        fs = A                       opcode:  D1
  4920.                                     cycles:    7
  4921.  
  4922.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab1
  4923.                                     cycles:    3 + d
  4924.  
  4925.        Set the specified fs field of B to zero.  Carry is not
  4926.        affected.
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.        B=A    fs  -  Copy A to B
  4933.        ---------
  4934.        fs = A                       opcode:  D8
  4935.                                     cycles:    7
  4936.  
  4937.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab8
  4938.                                     cycles:    3 + d
  4939.  
  4940.        Copy the fs field of register A into the corresponding field
  4941.        of register B. Carry is not affected.
  4942.  
  4943.  
  4944.  
  4945.  
  4946.                                  Page 75
  4947.  
  4948.  
  4949.  
  4950.  
  4951.        B=B!A  fs  -  B OR A into B
  4952.        ---------
  4953.        fs = A                       opcode:  0EFC
  4954.                                     cycles:    4 + d
  4955.  
  4956.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0EaC
  4957.                                     cycles:    4 + d
  4958.  
  4959.        Set the fs field of register B to its logical OR with the
  4960.        corresponding field of register A.  Carry is not affected.
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.        B=B!C  fs  -  B OR C into B
  4967.        ---------
  4968.        fs = A                       opcode:  0EF9
  4969.                                     cycles:    4 + d
  4970.  
  4971.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea9
  4972.                                     cycles:    4 + d
  4973.  
  4974.        Set the fs field of register B to its logical OR with the
  4975.        corresponding field of register C.  Carry is not affected.
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.        B=B&A  fs  -  B AND A into B
  4982.        ---------
  4983.        fs = A                       opcode:  0EF4
  4984.                                     cycles:    4 + d
  4985.  
  4986.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea4
  4987.                                     cycles:    4 + d
  4988.  
  4989.        Set the fs field of register B to its logical AND with the
  4990.        corresponding field of register A.  Carry is not affected.
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.        B=B&C  fs  -  B AND C into B
  4997.        ---------
  4998.        fs = A                       opcode:  0EF1
  4999.                                     cycles:    4 + d
  5000.  
  5001.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea1
  5002.                                     cycles:    4 + d
  5003.  
  5004.        Set the fs field of register B to its logical AND with the
  5005.        corresponding field of register C.  Carry is not affected.
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.                                  Page 76
  5013.  
  5014.  
  5015.  
  5016.  
  5017.        B=B+1  fs  -  Increment B
  5018.        ---------
  5019.        fs = A                       opcode:  E5
  5020.                                     cycles:    7
  5021.  
  5022.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba5
  5023.                                     cycles:    3 + d
  5024.  
  5025.        Increment the specified fs field of register B by one.
  5026.        Adjusts Carry.
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.        B=B+A  fs  -  Sum of B and A into B
  5033.        ---------
  5034.        fs = A                       opcode:  C8
  5035.                                     cycles:    7
  5036.  
  5037.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa8
  5038.                                     cycles:    3 + d
  5039.  
  5040.        Set the specified fs field of register B to the sum of
  5041.        itself and the corresponding field of register A. Adjusts
  5042.        Carry.
  5043.  
  5044.  
  5045.  
  5046.  
  5047.  
  5048.        B=B+B  fs  -  Sum of B and B into B
  5049.        ---------
  5050.        fs = A                       opcode:  C5
  5051.                                     cycles:    7
  5052.  
  5053.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa5
  5054.                                     cycles:    3 + d
  5055.  
  5056.        Double the specified fs field of register B. Adjusts Carry.
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.        B=B+C  fs  -  Sum of B and C into B
  5063.        ---------
  5064.        fs = A                       opcode:  C1
  5065.                                     cycles:    7
  5066.  
  5067.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa1
  5068.                                     cycles:    3 + d
  5069.  
  5070.        Set the specified fs field of register B to the sum of
  5071.        itself and the corresponding field of register C. Adjusts
  5072.        Carry.
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.                                  Page 77
  5079.  
  5080.  
  5081.  
  5082.  
  5083.        B=B-1  fs  -  Decrement B
  5084.        ---------
  5085.        fs = A                       opcode:  CD
  5086.                                     cycles:    7
  5087.  
  5088.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AaD
  5089.                                     cycles:    3 + d
  5090.  
  5091.        Decrement the specified fs field of register B by one.
  5092.        Adjusts Carry.
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.        B=B-A  fs  -  B minus A into B
  5099.        ---------
  5100.        fs = A                       opcode:  E8
  5101.                                     cycles:    7
  5102.  
  5103.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba8
  5104.                                     cycles:    3 + d
  5105.  
  5106.        Set the specified fs field of register B to the difference
  5107.        between itself and the corresponding field of register A.
  5108.        Adjusts Carry.
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.        B=B-C  fs  -  B minus C into B
  5115.        ---------
  5116.        fs = A                       opcode:  E1
  5117.                                     cycles:    7
  5118.  
  5119.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba1
  5120.                                     cycles:    3 + d
  5121.  
  5122.        Set the specified fs field of register B to the difference
  5123.        between itself and the corresponding field of register C.
  5124.        Adjusts Carry.
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.        B=C    fs  -  Copy C to B
  5131.        ---------
  5132.        fs = A                       opcode:  D5
  5133.                                     cycles:    7
  5134.  
  5135.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab5
  5136.                                     cycles:    3 + d
  5137.  
  5138.        Copy the fs field of register C into the corresponding field
  5139.        of register B. Carry is not affected.
  5140.  
  5141.  
  5142.  
  5143.  
  5144.                                  Page 78
  5145.  
  5146.  
  5147.  
  5148.  
  5149.        B=C-B  fs  -  C minus B into B
  5150.        ---------
  5151.        fs = A                       opcode:  ED
  5152.                                     cycles:    7
  5153.  
  5154.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BaD
  5155.                                     cycles:    3 + d
  5156.  
  5157.        Set the specified fs field of register B to the inverse
  5158.        difference between itself and the corresponding field of
  5159.        register C. Adjusts Carry.
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.        BAEX   fs  -  Exchange Registers B and A
  5166.        ---------
  5167.        fs = A                       opcode:  DC
  5168.                                     cycles:    7
  5169.  
  5170.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbC
  5171.                                     cycles:    3 + d
  5172.  
  5173.        Exchange the fs fields of registers of B and A. Carry is not
  5174.        affected.
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.        BCEX   fs  -  Exchange Registers B and C
  5181.        ---------
  5182.        fs = A                       opcode:  DD
  5183.                                     cycles:    7
  5184.  
  5185.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbD
  5186.                                     cycles:    3 + d
  5187.  
  5188.        Exchange the fs fields of registers of B and C. Carry is not
  5189.        affected.
  5190.  
  5191.  
  5192.  
  5193.  
  5194.        BSL    fs  -  B Shift Left
  5195.        ---------
  5196.        fs = A                       opcode:  F1
  5197.                                     cycles:    7
  5198.  
  5199.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb1
  5200.                                     cycles:    3 + d
  5201.  
  5202.        Shift the contents of the specified fs field of register B
  5203.        left one nibble, without affecting the rest of the register.
  5204.        The nibble shifted off the left end of the field is lost.
  5205.        The new low-order nibble of the field is zero. The Sticky
  5206.        Bit (SB) is not affected.
  5207.  
  5208.  
  5209.  
  5210.                                  Page 79
  5211.  
  5212.  
  5213.  
  5214.  
  5215.        BSLC      - B Shift Left Circular
  5216.        ---------
  5217.                                     opcode:  811
  5218.                                     cycles:   21
  5219.  
  5220.        Circular shift register B left one nibble.  Operates on all
  5221.        16 digits.  The Sticky Bit (SB) is not affected.
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.        BSR    fs  -  B Shift Right
  5228.        ---------
  5229.        fs = A                       opcode:  F5
  5230.                                     cycles:    7
  5231.  
  5232.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb5
  5233.                                     cycles:    3 + d
  5234.  
  5235.        Shift the contents of the specified fs field of register B
  5236.        right one nibble, without affecting the rest of the
  5237.        register. The nibble shifted off the right end of the field
  5238.        is lost, but the Sticky Bit (SB) is set if the nibble was
  5239.        non-zero.  The new high-order nibble of the field is zero.
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.        BSRB      - B Shift Right Bit
  5246.        ---------
  5247.                                     opcode:  81D
  5248.                                     cycles:   20
  5249.  
  5250.        Shift register B right one bit.  Operates on all 16 digits.
  5251.        The bit shifted off the end is lost, but the Sticky Bit (SB)
  5252.        is set if it was non-zero.  The new high-order bit of the
  5253.        register is zero.
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260.        BSRC      - B Shift Right Circular
  5261.        ---------
  5262.                                     opcode:  815
  5263.                                     cycles:   21
  5264.  
  5265.        Circular shift register B right one nibble.  Operates on all
  5266.        16 digits. The Sticky Bit (SB) is set if the nibble shifted
  5267.        from low-order around to high-order position was non-zero.
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.                                  Page 80
  5277.  
  5278.  
  5279.  
  5280.  
  5281.        BUSCC     - Bus Command "C"
  5282.        ---------
  5283.                                     opcode:  80B
  5284.                                     cycles:    6
  5285.  
  5286.        Enters the Saturn bus command "C" onto the system bus (this
  5287.        command is reserved for later use).  No other operation is
  5288.        performed.  See the "HP-71 Hardware Specification" for more
  5289.        information.
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.        C+P+1     - Increment C by One Plus P Pointer
  5296.        ---------
  5297.                                     opcode:  809
  5298.                                     cycles:    8
  5299.  
  5300.        The A field of the C register is incremented by one plus the
  5301.        value of the P pointer.  This instruction is always executed
  5302.        in HEX mode.  Adjusts Carry.
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.        C=-C   fs  -  Two's complement of C into C
  5309.        ---------
  5310.        fs = A                       opcode:  FA
  5311.                                     cycles:    7
  5312.  
  5313.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BbA
  5314.                                     cycles:    3 + d
  5315.  
  5316.        Complement the specified fs field of C. Complement is two's
  5317.        complement if in HEX mode, ten's complement if in DEC mode.
  5318.        Carry is set if the field is not zero, else Carry is
  5319.        cleared.
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.        C=-C-1 fs  -  One's complement of C into C
  5326.        ---------
  5327.        fs = A                       opcode:  FE
  5328.                                     cycles:    7
  5329.  
  5330.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BbE
  5331.                                     cycles:    3 + d
  5332.  
  5333.        Perform a one's complement on the specified fs field of C.
  5334.        Carry is always cleared.
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.                                  Page 81
  5343.  
  5344.  
  5345.  
  5346.  
  5347.        C=0    fs  -  Set C equal to 0
  5348.        ---------
  5349.        fs = A                       opcode:  D2
  5350.                                     cycles:    7
  5351.  
  5352.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab2
  5353.                                     cycles:    3 + d
  5354.  
  5355.        Set the specified fs field of C to zero.  Carry is not
  5356.        affected.
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.        C=A    fs  -  Copy A to C
  5363.        ---------
  5364.        fs = A                       opcode:  D6
  5365.                                     cycles:    7
  5366.  
  5367.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab6
  5368.                                     cycles:    3 + d
  5369.  
  5370.        Copy the fs field of register A into the corresponding field
  5371.        of register C. Carry is not affected.
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.        C=A-C  fs  -  A minus C into C
  5378.        ---------
  5379.        fs = A                       opcode:  EE
  5380.                                     cycles:    7
  5381.  
  5382.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BaE
  5383.                                     cycles:    3 + d
  5384.  
  5385.        Set the specified fs field of register C to the inverse
  5386.        difference between itself and the corresponding field of
  5387.        register A. Adjusts Carry.
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.        C=B    fs  -  Copy B to C
  5394.        ---------
  5395.        fs = A                       opcode:  D9
  5396.                                     cycles:    7
  5397.  
  5398.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab9
  5399.                                     cycles:    3 + d
  5400.  
  5401.        Copy the fs field of register B into the corresponding field
  5402.        of register C. Carry is not affected.
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.                                  Page 82
  5409.  
  5410.  
  5411.  
  5412.  
  5413.        C=C!A  fs  -  C OR A into C
  5414.        ---------
  5415.        fs = A                       opcode:  0EFA
  5416.                                     cycles:    4 + d
  5417.  
  5418.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0EaA
  5419.                                     cycles:    4 + d
  5420.  
  5421.        Set the fs field of register C to its logical OR with the
  5422.        corresponding field of register A.  Carry is not affected.
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.        C=C!B  fs  -  C OR B into C
  5429.        ---------
  5430.        fs = A                       opcode:  0EFD
  5431.                                     cycles:    4 + d
  5432.  
  5433.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0EaD
  5434.                                     cycles:    4 + d
  5435.  
  5436.        Set the fs field of register C to its logical OR with the
  5437.        corresponding field of register B.  Carry is not affected.
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.        C=C!D  fs  -  C OR D into C
  5444.        ---------
  5445.        fs = A                       opcode:  0EFF
  5446.                                     cycles:    4 + d
  5447.  
  5448.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0EaF
  5449.                                     cycles:    4 + d
  5450.  
  5451.        Set the fs field of register C to its logical OR with the
  5452.        corresponding field of register D.  Carry is not affected.
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.        C=C&A  fs  -  C AND A into A
  5459.        ---------
  5460.        fs = A                       opcode:  0EF2
  5461.                                     cycles:    4 + d
  5462.  
  5463.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea2
  5464.                                     cycles:    4 + d
  5465.  
  5466.        Set the fs field of register C to its logical AND with the
  5467.        corresponding field of register A.  Carry is not affected.
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.                                  Page 83
  5475.  
  5476.  
  5477.  
  5478.  
  5479.        C=C&B  fs  -  C AND B into C
  5480.        ---------
  5481.        fs = A                       opcode:  0EF5
  5482.                                     cycles:    4 + d
  5483.  
  5484.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea5
  5485.                                     cycles:    4 + d
  5486.  
  5487.        Set the fs field of register C to its logical AND with the
  5488.        corresponding field of register B.  Carry is not affected.
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.        C=C&D  fs  -  C AND D into C
  5495.        ---------
  5496.        fs = A                       opcode:  0EF7
  5497.                                     cycles:    4 + d
  5498.  
  5499.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea7
  5500.                                     cycles:    4 + d
  5501.  
  5502.        Set the fs field of register C to its logical AND with the
  5503.        corresponding field of register D.  Carry is not affected.
  5504.  
  5505.  
  5506.  
  5507.  
  5508.  
  5509.        C=C+1  fs  -  Increment C
  5510.        ---------
  5511.        fs = A                       opcode:  E6
  5512.                                     cycles:    7
  5513.  
  5514.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba6
  5515.                                     cycles:    3 + d
  5516.  
  5517.        Increment the specified fs field of register C by one.
  5518.        Adjusts Carry.
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.        C=C+A  fs   - Sum of C and A into C
  5525.        ---------
  5526.        fs = A                       opcode:  C2
  5527.                                     cycles:    7
  5528.  
  5529.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa2
  5530.                                     cycles:    3 + d
  5531.  
  5532.        Set the specified fs field of register C to the sum of
  5533.        itself and the corresponding field of register A. Adjusts
  5534.        Carry.
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.                                  Page 84
  5541.  
  5542.  
  5543.  
  5544.  
  5545.        C=C+B  fs  -  Sum of C and B into C
  5546.        ---------
  5547.        fs = A                       opcode:  C9
  5548.                                     cycles:    7
  5549.  
  5550.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa9
  5551.                                     cycles:    3 + d
  5552.  
  5553.        Set the specified fs field of register C to the sum of
  5554.        itself and the corresponding field of register B. Adjusts
  5555.        Carry.
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.        C=C+C  fs   - Sum of C and C into C
  5562.        ---------
  5563.        fs = A                       opcode:  C6
  5564.                                     cycles:    7
  5565.  
  5566.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa6
  5567.                                     cycles:    3 + d
  5568.  
  5569.        Double the specified fs field of register C. Adjusts Carry.
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.        C=C+D  fs  -  Sum of C and D into C
  5576.        ---------
  5577.        fs = A                       opcode:  CB
  5578.                                     cycles:    7
  5579.  
  5580.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AaB
  5581.                                     cycles:    3 + d
  5582.  
  5583.        Set the specified fs field of register C to the sum of
  5584.        itself and the corresponding field of register D. Adjusts
  5585.        Carry.
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.        C=C-1  fs  -  Decrement C
  5592.        ---------
  5593.        fs = A                       opcode:  CE
  5594.                                     cycles:    7
  5595.  
  5596.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AaE
  5597.                                     cycles:    3 + d
  5598.  
  5599.        Decrement the specified fs field of register C by one.
  5600.        Adjusts Carry.
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.                                  Page 85
  5607.  
  5608.  
  5609.  
  5610.  
  5611.        C=C-A  fs  -  C minus A into C
  5612.        ---------
  5613.        fs = A                       opcode:  E2
  5614.                                     cycles:    7
  5615.  
  5616.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba2
  5617.                                     cycles:    3 + d
  5618.  
  5619.        Set the specified fs field of register C to the difference
  5620.        between itself and the corresponding field of register A.
  5621.        Adjusts Carry.
  5622.  
  5623.  
  5624.  
  5625.  
  5626.  
  5627.        C=C-B  fs  -  C minus B into C
  5628.        ---------
  5629.        fs = A                       opcode:  E9
  5630.                                     cycles:    7
  5631.  
  5632.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba9
  5633.                                     cycles:    3 + d
  5634.  
  5635.        Set the specified fs field of register C to the difference
  5636.        between itself and the corresponding field of register B.
  5637.        Adjusts Carry.
  5638.  
  5639.  
  5640.  
  5641.  
  5642.  
  5643.        C=C-D  fs  -  C minus D into C
  5644.        ---------
  5645.        fs = A                       opcode:  EB
  5646.                                     cycles:    7
  5647.  
  5648.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BaB
  5649.                                     cycles:    3 + d
  5650.  
  5651.        Set the specified fs field of register C to the difference
  5652.        between itself and the corresponding field of register D.
  5653.        Adjusts Carry.
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.        C=D    fs  -  Copy D to C
  5660.        ---------
  5661.        fs = A                       opcode:  DB
  5662.                                     cycles:    7
  5663.  
  5664.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbB
  5665.                                     cycles:    3 + d
  5666.  
  5667.        Copy the fs field of register D into the corresponding field
  5668.        of register C. Carry is not affected.
  5669.  
  5670.  
  5671.  
  5672.                                  Page 86
  5673.  
  5674.  
  5675.  
  5676.  
  5677.        C=DAT0 fsd -  Load C from memory
  5678.        ---------
  5679.        fs = A                       opcode:  146
  5680.                                     cycles:   18
  5681.  
  5682.        fs = B                       opcode:  14E
  5683.                                     cycles:   15
  5684.  
  5685.        fs = (P,WP,XS,X,S,M,W)       opcode:  156a
  5686.                                     cycles:   17 + d
  5687.  
  5688.        fs = d                       opcode:  15Ex (x=d-1)
  5689.                                     cycles:   16 + d
  5690.  
  5691.        The amount of data (d nibbles) specified by fsd will be
  5692.        transferred from the memory address pointed to by D0 into
  5693.        the specified field of register C.  The lowest-addressed
  5694.        nibble will be transferred into the lowest-order nibble of
  5695.        the register field, proceeding toward the higher-order
  5696.        nibbles. If fs = d, d nibbles are transferred into the
  5697.        register starting at nibble 0. See the section on "Loading
  5698.        Data From Memory".
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.        C=DAT1 fsd -  Load C from memory
  5705.        ---------
  5706.        fs = A                       opcode:  147
  5707.                                     cycles:   18
  5708.  
  5709.        fs = B                       opcode:  14F
  5710.                                     cycles:   15
  5711.  
  5712.        fs = (P,WP,XS,X,S,M,W)       opcode:  157a
  5713.                                     cycles:   17 + d
  5714.  
  5715.        fs = d                       opcode:  15Fx (x=d-1)
  5716.                                     cycles:   16 + d
  5717.  
  5718.        The amount of data (d nibbles) specified by fsd will be
  5719.        transferred from the memory address pointed to by D1 into
  5720.        the specified field of register C.  The lowest-addressed
  5721.        nibble will be transferred into the lowest-order nibble of
  5722.        the register field, proceeding toward the higher-order
  5723.        nibbles. If fs = d, d nibbles are transferred into the
  5724.        register starting at nibble 0. See the section on "Loading
  5725.        Data From Memory".
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.                                  Page 87
  5739.  
  5740.  
  5741.  
  5742.  
  5743.        C=ID      - Request chip ID
  5744.        ---------
  5745.                                     opcode:  806
  5746.                                     cycles:   11
  5747.  
  5748.        The chip which has its DAISY-IN line high and its
  5749.        configuration flag low will send its 5 nibble ID register to
  5750.        the system bus which will be loaded into the low-order 5
  5751.        nibbles (A field) of the C register.
  5752.  
  5753.  
  5754.  
  5755.  
  5756.  
  5757.        C=IN      - Load C with IN
  5758.        ---------
  5759.                                     opcode:  803
  5760.                                     cycles:    7
  5761.  
  5762.        Load the low-order 4 nibbles of the C register with the
  5763.        contents of the Input register.
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.        C=P    n    - Copy P Pointer into Nibble n of C
  5770.        ---------
  5771.                                     opcode:  80Cn
  5772.                                     cycles:    6
  5773.  
  5774.        Copy P pointer into C register at digit position specified
  5775.        by n.
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.        C=R0      - Copy R0 to C
  5782.        ---------
  5783.                                     opcode:  118
  5784.                                     cycles:   19
  5785.  
  5786.        The contents of the scratch register R0 is copied to the
  5787.        working register C.
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.        C=R1      - Copy R1 to C
  5794.        ---------
  5795.                                     opcode:  119
  5796.                                     cycles:   19
  5797.  
  5798.        The contents of the scratch register R1 is copied to the
  5799.        working register C.
  5800.  
  5801.  
  5802.  
  5803.  
  5804.                                  Page 88
  5805.  
  5806.  
  5807.  
  5808.  
  5809.        C=R2      - Copy R2 to C
  5810.        ---------
  5811.                                     opcode:  11A
  5812.                                     cycles:   19
  5813.  
  5814.        The contents of the scratch register R2 is copied to the
  5815.        working register C.
  5816.  
  5817.  
  5818.  
  5819.  
  5820.  
  5821.        C=R3      - Copy R3 to C
  5822.        ---------
  5823.                                     opcode:  11B
  5824.                                     cycles:   19
  5825.  
  5826.        The contents of the scratch register R3 is copied to the
  5827.        working register C.
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.        C=R4      - Copy R4 to C
  5834.        ---------
  5835.                                     opcode:  11C
  5836.                                     cycles:   19
  5837.  
  5838.        The contents of the scratch register R4 is copied to the
  5839.        working register C.
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.        C=RSTK    - Pop stack to C
  5846.        ---------
  5847.                                     opcode:  07
  5848.                                     cycles:    8
  5849.  
  5850.        Pop the top-most address off of the hardware return stack,
  5851.        placing the address in the lower 5 nibbles (A field) of
  5852.        register C. The high-order nibbles of C are unchanged.  As
  5853.        the address is popped from the return stack, a zero address
  5854.        is inserted at the bottom of the stack.  Compare with the
  5855.        RTN mnemonic.
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.                                  Page 89
  5871.  
  5872.  
  5873.  
  5874.  
  5875.        C=ST      - Status to C
  5876.        ---------
  5877.                                     opcode:  09
  5878.                                     cycles:    6
  5879.  
  5880.        Copy the low-order 12 bits of the status register into the
  5881.        low-order 12 bits (X field) of the C register.
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.        CAEX   fs  -  Exchange Registers C and A
  5888.        ---------
  5889.        fs = A                       opcode:  DE
  5890.                                     cycles:    7
  5891.  
  5892.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbE
  5893.                                     cycles:    3 + d
  5894.  
  5895.        Exchange the fs fields of registers of C and A. Carry is not
  5896.        affected.
  5897.  
  5898.  
  5899.  
  5900.  
  5901.  
  5902.        CBEX   fs  -  Exchange Registers C and B
  5903.        ---------
  5904.        fs = A                       opcode:  DD
  5905.                                     cycles:    7
  5906.  
  5907.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbD
  5908.                                     cycles:    3 + d
  5909.  
  5910.        Exchange the fs fields of registers of C and B. Carry is not
  5911.        affected.
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.        CD0EX     - Exchange C and D0 (nibs 0-4)
  5918.        ---------
  5919.                                     opcode:  136
  5920.                                     cycles:    8
  5921.  
  5922.        Exchange the A field of register C with Data pointer D0.
  5923.        Carry is not affected.
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.                                  Page 90
  5937.  
  5938.  
  5939.  
  5940.  
  5941.        CD0XS     - Exchange C and D0 short (nibs 0-3)
  5942.        ---------
  5943.                                     opcode:  13E
  5944.                                     cycles:    7
  5945.  
  5946.        Exchange the lower 4 nibbles of C with the lower 4 nibbles
  5947.        of Data pointer D0.  Carry is not affected.
  5948.  
  5949.  
  5950.  
  5951.  
  5952.  
  5953.        CD1EX     - Exchange C and D1 (nibs 0-4)
  5954.        ---------
  5955.                                     opcode:  137
  5956.                                     cycles:    8
  5957.  
  5958.        Exchange the A field of register C with Data pointer D1.
  5959.        Carry is not affected.
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.        CD1XS     - Exchange C and D1 short (nibs 0-3)
  5966.        ---------
  5967.                                     opcode:  13F
  5968.                                     cycles:    7
  5969.  
  5970.        Exchange the lower 4 nibbles of C with the lower 4 nibbles
  5971.        of Data pointer D1.  Carry is not affected.
  5972.  
  5973.  
  5974.  
  5975.  
  5976.  
  5977.        CDEX   fs  -  Exchange Registers C and D
  5978.        ---------
  5979.        fs = A                       opcode:  DF
  5980.                                     cycles:    7
  5981.  
  5982.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbF
  5983.                                     cycles:    3 + d
  5984.  
  5985.        Exchange the fs fields of registers of C and D. Carry is not
  5986.        affected.
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.                                  Page 91
  6003.  
  6004.  
  6005.  
  6006.  
  6007.        CLRHST    - Clear Hardware Status bits
  6008.        ---------
  6009.                                     opcode:  82F
  6010.                                     cycles:    3
  6011.  
  6012.        Clears the 4 Hardware Status bits XM, SB, SR and MP.  Note
  6013.        that the opcode is actually 82x, where x is merely a mask
  6014.        for which Hardware Status bits to clear, as follows:
  6015.  
  6016.           bit 0 -  External Module Missing bit (see XM=0 mnemonic)
  6017.           bit 1 -  Sticky Bit                  (see SB=0 mnemonic)
  6018.           bit 2 -  Service Request bit         (see SR=0 mnemonic)
  6019.           bit 3 -  Module Pulled bit           (see MP=0 mnemonic)
  6020.  
  6021.        For example opcode 829 clears XM and MP.  Although there is
  6022.        no mnemonic for this, the opcode can be inserted into the
  6023.        code by using, for example, NIBHEX  829.
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.        CLRST     - Clear Program Status
  6030.        ---------
  6031.                                     opcode:  08
  6032.                                     cycles:    6
  6033.  
  6034.        Clear the low-order 12 bits (S0 through S11) of the Program
  6035.        Status register ST.
  6036.  
  6037.  
  6038.  
  6039.  
  6040.  
  6041.        CONFIG    - Configure
  6042.        ---------
  6043.                                     opcode:  805
  6044.                                     cycles:   11
  6045.  
  6046.        Copy the low-order 5 nibbles (A field) of the C register
  6047.        into the Configuration register of the chip which has its
  6048.        DAISY-IN line high and its configuration flag low. See the
  6049.        "HP-71 Hardware Specification" for information.
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.        CPEX   n    - Exchange Nibble n of C With P Pointer
  6056.        ---------
  6057.                                     opcode:  80Fn
  6058.                                     cycles:    6
  6059.  
  6060.        Exchange the P pointer with digit n of the C register.
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.                                  Page 92
  6069.  
  6070.  
  6071.  
  6072.  
  6073.        CR0EX     - Exchange C and R0
  6074.        ---------
  6075.                                     opcode:  128
  6076.                                     cycles:   19
  6077.  
  6078.        Exchange the contents of the working register C and the
  6079.        scratch register R0.
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.        CR1EX     - Exchange C and R1
  6086.        ---------
  6087.                                     opcode:  129
  6088.                                     cycles:   19
  6089.  
  6090.        Exchange the contents of the working register C and the
  6091.        scratch register R1.
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.        CR2EX     - Exchange C and R2
  6098.        ---------
  6099.                                     opcode:  12A
  6100.                                     cycles:   19
  6101.  
  6102.        Exchange the contents of the working register C and the
  6103.        scratch register R2.
  6104.  
  6105.  
  6106.  
  6107.  
  6108.  
  6109.        CR3EX     - Exchange C and R3
  6110.        ---------
  6111.                                     opcode:  12B
  6112.                                     cycles:   19
  6113.  
  6114.        Exchange the contents of the working register C and the
  6115.        scratch register R3.
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.                                  Page 93
  6135.  
  6136.  
  6137.  
  6138.  
  6139.        CR4EX     - Exchange C and R4
  6140.        ---------
  6141.                                     opcode:  12C
  6142.                                     cycles:   19
  6143.  
  6144.        Exchange the contents of the working register C and the
  6145.        scratch register R4.
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.        CSL    fs  -  C Shift Left
  6152.        ---------
  6153.        fs = A                       opcode:  F2
  6154.                                     cycles:    7
  6155.  
  6156.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb2
  6157.                                     cycles:    3 + d
  6158.  
  6159.        Shift the contents of the specified fs field of register C
  6160.        left one nibble, without affecting the rest of the register.
  6161.        The nibble shifted off the left end of the field is lost.
  6162.        The new low-order nibble of the field is zero. The Sticky
  6163.        Bit (SB) is not affected.
  6164.  
  6165.  
  6166.  
  6167.  
  6168.  
  6169.        CSLC      - C Shift Left Circular
  6170.        ---------
  6171.                                     opcode:  812
  6172.                                     cycles:   21
  6173.  
  6174.        Circular shift register C left one nibble.  Operates on all
  6175.        16 digits.  The Sticky Bit (SB) is not affected.
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.                                  Page 94
  6201.  
  6202.  
  6203.  
  6204.  
  6205.        CSR    fs  -  C Shift Right
  6206.        ---------
  6207.        fs = A                       opcode:  F6
  6208.                                     cycles:    7
  6209.  
  6210.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb6
  6211.                                     cycles:    3 + d
  6212.  
  6213.        Shift the contents of the specified fs field of register C
  6214.        right one nibble, without affecting the rest of the
  6215.        register. The nibble shifted off the right end of the field
  6216.        is lost, but the Sticky Bit (SB) is set if the nibble was
  6217.        non-zero.  The new high-order nibble of the field is zero.
  6218.  
  6219.  
  6220.  
  6221.  
  6222.  
  6223.        CSRB      - C Shift Right Bit
  6224.        ---------
  6225.                                     opcode:  81E
  6226.                                     cycles:   20
  6227.  
  6228.        Shift register C right one bit.  Operates on all 16 digits.
  6229.        The bit shifted off the end is lost, but the Sticky Bit (SB)
  6230.        is set if it was non-zero.  The new high-order bit of the
  6231.        register is zero.
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.        CSRC      - C Shift Right Circular
  6238.        ---------
  6239.                                     opcode:  816
  6240.                                     cycles:   21
  6241.  
  6242.        Circular shift register C right one nibble.  Operates on all
  6243.        16 digits. The Sticky Bit (SB) is set if the nibble shifted
  6244.        from low-order around to high-order position was non-zero.
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.        CSTEX     - Exchange Status
  6253.        ---------
  6254.                                     opcode:  0B
  6255.                                     cycles:    6
  6256.  
  6257.        Exchange the low-order 12 bits (S0 through S11) of the
  6258.        Program Status register ST with the low-order 12 bits of the
  6259.        C register.
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.                                  Page 95
  6267.  
  6268.  
  6269.  
  6270.  
  6271.        D0=(2)  nn    - Load 2 Nibbles Into D0
  6272.        ------------
  6273.                                     opcode:  19nn
  6274.                                     cycles:    4
  6275.  
  6276.        Load the low-order two nibbles of D0 with nn. The upper
  6277.        nibbles of D0 remain unchanged. Any overflow is ignored by
  6278.        the assembler. The assembled digits of nn are stored in the
  6279.        opcode in reverse order so that when the instruction is
  6280.        executed the data will be loaded into the register with the
  6281.        intended orientation.  See the section on "Loading Data From
  6282.        Memory".
  6283.  
  6284.  
  6285.  
  6286.  
  6287.  
  6288.        D0=(4)  nnnn  - Load 4 Nibbles Into D0
  6289.        ------------
  6290.                                     opcode:  1Annnn
  6291.                                     cycles:    6
  6292.  
  6293.        Load the low-order four nibbles of D0 with nnnn.  The upper
  6294.        nibble of D0 remains unchanged. Any overflow is ignored by
  6295.        the assembler. The assembled digits of nnnn are stored in
  6296.        the opcode in reverse order so that when the instruction is
  6297.        executed the data will be loaded into the register with the
  6298.        intended orientation.  See the section on "Loading Data From
  6299.        Memory".
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.        D0=(5)  nnnnn - Load 5 Nibbles Into D0
  6306.        ------------
  6307.                                     opcode:  1Bnnnnn
  6308.                                     cycles:    7
  6309.  
  6310.        Load all five nibbles of D0 with nnnnn. Any overflow is
  6311.        ignored by the assembler. The assembled digits of nnnnn are
  6312.        stored in the opcode in reverse order so that when the
  6313.        instruction is executed the data will be loaded into the
  6314.        register with the intended orientation.  See the section on
  6315.        "Loading Data From Memory".
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.                                  Page 96
  6333.  
  6334.  
  6335.  
  6336.  
  6337.        D0=A      - Copy A to D0 (nibs 0-4)
  6338.        ---------
  6339.                                     opcode:  130
  6340.                                     cycles:    8
  6341.  
  6342.        The A field of register A is copied into Data pointer
  6343.        register D0.  Carry is not affected.
  6344.  
  6345.  
  6346.  
  6347.  
  6348.  
  6349.        D0=AS      - Copy A to D0 short (nibs 0-3)
  6350.        ---------
  6351.                                     opcode:  138
  6352.                                     cycles:    7
  6353.  
  6354.        The lower 4 nibbles of A are copied into the lower 4 nibbles
  6355.        of Data pointer register D0.  Carry is not affected.
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.        D0=C      - Copy C to D0 (nibs 0-4)
  6362.        ---------
  6363.                                     opcode:  134
  6364.                                     cycles:    8
  6365.  
  6366.        The A field of register C is copied into Data pointer
  6367.        register D0.  Carry is not affected.
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373.        D0=CS      - Copy C to D0 short (nibs 0-3)
  6374.        ---------
  6375.                                     opcode:  13C
  6376.                                     cycles:    7
  6377.  
  6378.        The lower 4 nibbles of C are copied into the lower 4 nibbles
  6379.        of Data pointer register D0.  Carry is not affected.
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.                                  Page 97
  6399.  
  6400.  
  6401.  
  6402.  
  6403.        D0=D0+  n   - Add n to D0 (1<=n<=16)
  6404.        ---------
  6405.                                     opcode:  16x (x=n-1)
  6406.                                     cycles:    7
  6407.  
  6408.        Increment D0 by n.  This instruction is always executed in
  6409.        HEX mode.  Adjusts Carry.
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.        D0=D0-  n   - Subtract n from D0 (1<=n<=16) ---------
  6416.                                     opcode:  18x (x=n-1)
  6417.                                     cycles:    7
  6418.  
  6419.        Decrement D0 by n.  This instruction is always executed in
  6420.        HEX mode.  Adjusts Carry.
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.        D0=HEX hh  - Load D0 with hex constant hh
  6427.        ---------
  6428.                                     opcode:  19hh
  6429.                                     cycles:     4
  6430.  
  6431.        Load the low-order two nibbles of D0 with the hex constant
  6432.        hh.  The upper nibbles of D0 remain unchanged. The digits of
  6433.        hh are stored in the opcode in reverse order so that when
  6434.        the instruction is executed the data will be loaded into the
  6435.        register with the intended orientation.  See the section on
  6436.        "Loading Data From Memory".
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.        D0=HEX hhhh  - Load D0 with hex constant hhhh
  6443.        -----------
  6444.                                     opcode:  1Ahhhh
  6445.                                     cycles:     6
  6446.  
  6447.        Load the low-order four nibbles of D0 with the hex constant
  6448.        hhhh. The upper nibble of D0 remains unchanged. The digits
  6449.        of hhhh are stored in the opcode in reverse order so that
  6450.        when the instruction is executed the data will be loaded
  6451.        into the register with the intended orientation.  See the
  6452.        section on "Loading Data From Memory".
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.                                  Page 98
  6465.  
  6466.  
  6467.  
  6468.  
  6469.        D0=HEX hhhhh  - Load D0 with hex constant hhhhh
  6470.        ------------
  6471.                                     opcode:  1Bhhhhh
  6472.                                     cycles:    7
  6473.  
  6474.        Load all five nibbles of D0 with the hex constant hhhhh.
  6475.        The digits of hhhhh are stored in the opcode in reverse
  6476.        order so that when the instruction is executed the data will
  6477.        be loaded into the register with the intended orientation.
  6478.        See the section on "Loading Data From Memory".
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.        D1=(2)  nn    - Load 2 Nibbles Into D1
  6486.        ---------
  6487.                                     opcode:  1Dnn
  6488.                                     cycles:    4
  6489.  
  6490.        Load the low-order two nibbles of D1 with nn. The upper
  6491.        nibbles of D1 remain unchanged. Any overflow is ignored by
  6492.        the assembler. The assembled digits of nn are stored in the
  6493.        opcode in reverse order so that when the instruction is
  6494.        executed the data will be loaded into the register with the
  6495.        intended orientation.  See the section on "Loading Data From
  6496.        Memory".
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.        D1=(4)  nnnn  - Load 4 Nibbles Into D1
  6503.        ------------
  6504.                                     opcode:  1Ennnn
  6505.                                     cycles:    6
  6506.  
  6507.        Load the low-order four nibbles of D1 with nnnn. The upper
  6508.        nibble of D1 remains unchanged.  Any overflow is ignored by
  6509.        the assembler. The assembled digits of nnnn are stored in
  6510.        the opcode in reverse order so that when the instruction is
  6511.        executed the data will be loaded into the register with the
  6512.        intended orientation.  See the section on "Loading Data From
  6513.        Memory".
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.                                  Page 99
  6531.  
  6532.  
  6533.  
  6534.  
  6535.        D1=(5)  nnnnn - Load 5 Nibbles Into D1
  6536.        ------------
  6537.                                     opcode:  1Fnnnnn
  6538.                                     cycles:    7
  6539.  
  6540.        Load all five nibbles of D1 with nnnnn. Any overflow is
  6541.        ignored by the assembler. The assembled digits of nnnnn are
  6542.        stored in the opcode in reverse order so that when the
  6543.        instruction is executed the data will be loaded into the
  6544.        register with the intended orientation.  See the section on
  6545.        "Loading Data From Memory".
  6546.  
  6547.  
  6548.  
  6549.  
  6550.  
  6551.        D1=A      - Copy A to D1 (nibs 0-4)
  6552.        ---------
  6553.                                     opcode:  131
  6554.                                     cycles:    8
  6555.  
  6556.        The A field of register A is copied into Data pointer
  6557.        register D1.  Carry is not affected.
  6558.  
  6559.  
  6560.  
  6561.  
  6562.  
  6563.        D1=AS     - Copy A to D1 short (nibs 0-3)
  6564.        ---------
  6565.                                     opcode:  139
  6566.                                     cycles:    7
  6567.  
  6568.        The lower 4 nibbles of A are copied into the lower 4 nibbles
  6569.        of Data pointer register D1.  Carry is not affected.
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.        D1=C       - Copy C to D1 (nibs 0-4)
  6576.        ---------
  6577.                                     opcode:  135
  6578.                                     cycles:    8
  6579.  
  6580.        The A field of register C is copied into Data pointer
  6581.        register D1.  Carry is not affected.
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.                                  Page 100
  6597.  
  6598.  
  6599.  
  6600.  
  6601.        D1=CS     - Copy C to D1 short (nibs 0-3)
  6602.        ---------
  6603.                                     opcode:  13D
  6604.                                     cycles:    7
  6605.  
  6606.        The lower 4 nibbles of C are copied into the lower 4 nibbles
  6607.        of Data pointer register D1.  Carry is not affected.
  6608.  
  6609.  
  6610.  
  6611.  
  6612.  
  6613.        D1=D1+  n  - Add n to D1 (1<=n<=16)
  6614.        ---------
  6615.                                     opcode:  17x (x=n-1)
  6616.                                     cycles:    7
  6617.  
  6618.        Increment D1 by n.  This instruction is always executed in
  6619.        HEX mode.  Adjusts Carry.
  6620.  
  6621.  
  6622.  
  6623.  
  6624.  
  6625.        D1=D1-  n  - Subtract n from D1 (1<=n<=16)
  6626.        ---------
  6627.                                     opcode:  1Cx (x=n-1)
  6628.                                     cycles:    7
  6629.  
  6630.        Decrement D1 by n.  This instruction is always executed in
  6631.        HEX mode.  Adjusts Carry.
  6632.  
  6633.  
  6634.  
  6635.  
  6636.  
  6637.        D1=HEX hh  - Load D1 with hex constant hh
  6638.        ---------
  6639.                                     opcode:  1Dhh
  6640.                                     cycles:     4
  6641.  
  6642.        Load the low-order two nibbles of D1 with the hex constant
  6643.        hh.  The upper nibbles of D1 remain unchanged. The digits of
  6644.        hh are stored in the opcode in reverse order so that when
  6645.        the instruction is executed the data will be loaded into the
  6646.        register with the intended orientation.  See the section on
  6647.        "Loading Data From Memory".
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.                                  Page 101
  6663.  
  6664.  
  6665.  
  6666.  
  6667.        D1=HEX hhhh  - Load D1 with hex constant hhhh
  6668.        -----------
  6669.                                     opcode:  1Ehhhh
  6670.                                     cycles:     6
  6671.  
  6672.        Load the low-order four nibbles of D1 with the hex constant
  6673.        hhhh. The upper nibble of D1 remains unchanged. The digits
  6674.        of hhhh are stored in the opcode in reverse order so that
  6675.        when the instruction is executed the data will be loaded
  6676.        into the register with the intended orientation.  See the
  6677.        section on "Loading Data From Memory".
  6678.  
  6679.  
  6680.  
  6681.  
  6682.  
  6683.        D1=HEX hhhhh  - Load D1 with hex constant hhhhh
  6684.        ------------
  6685.                                     opcode:  1Fhhhhh
  6686.                                     cycles:      7
  6687.  
  6688.        Load all five nibbles of D1 with the hex constant hhhhh.
  6689.        The digits of hhhhh are stored in the opcode in reverse
  6690.        order so that when the instruction is executed the data will
  6691.        be loaded into the register with the intended orientation.
  6692.        See the section on "Loading Data From Memory".
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.        D=-D   fs  -  Two's complement of D into D
  6699.        ---------
  6700.        fs = A                       opcode:  FB
  6701.                                     cycles:    7
  6702.  
  6703.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BbB
  6704.                                     cycles:    3 + d
  6705.  
  6706.        Complement the specified fs field of D. Complement is two's
  6707.        complement if in HEX mode, ten's complement if in DEC mode.
  6708.        Carry is set if the field is not zero, else Carry is
  6709.        cleared.
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.                                  Page 102
  6729.  
  6730.  
  6731.  
  6732.  
  6733.        D=-D-1 fs  -  One's complement of D into D
  6734.        ---------
  6735.        fs = A                       opcode:  FF
  6736.                                     cycles:    7
  6737.  
  6738.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BbF
  6739.                                     cycles:    3 + d
  6740.  
  6741.        Perform a one's complement on the specified fs field of D.
  6742.        Carry is always cleared.
  6743.  
  6744.  
  6745.  
  6746.  
  6747.  
  6748.        D=0    fs  -  Set D equal to 0
  6749.        ---------
  6750.        fs = A                       opcode:  D3
  6751.                                     cycles:    7
  6752.  
  6753.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab3
  6754.                                     cycles:    3 + d
  6755.  
  6756.        Set the specified fs field of D to zero.  Carry is not
  6757.        affected.
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.        D=C    fs  -  Copy C to D
  6764.        ---------
  6765.        fs = A                       opcode:  D7
  6766.                                     cycles:    7
  6767.  
  6768.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ab7
  6769.                                     cycles:    3 + d
  6770.  
  6771.        Copy the fs field of register C into the corresponding field
  6772.        of register D. Carry is not affected.
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.  
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791.  
  6792.  
  6793.  
  6794.                                  Page 103
  6795.  
  6796.  
  6797.  
  6798.  
  6799.        D=C-D  fs  -  C minus D into D
  6800.        ---------
  6801.        fs = A                       opcode:  ED
  6802.                                     cycles:    7
  6803.  
  6804.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  BaD
  6805.                                     cycles:    3 + d
  6806.  
  6807.        Set the specified fs field of register D to the inverse
  6808.        difference between itself and the corresponding field of
  6809.        register C. Adjusts Carry.
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.        D=D!C  fs  -  D OR C into D
  6816.        ---------
  6817.        fs = A                       opcode:  0EFB
  6818.                                     cycles:    4 + d
  6819.  
  6820.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0EaB
  6821.                                     cycles:    4 + d
  6822.  
  6823.        Set the fs field of register D to its logical OR with the
  6824.        corresponding field of register C.  Carry is not affected.
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.        D=D&C  fs  -  D AND C into D
  6831.        ---------
  6832.        fs = A                       opcode:  0EF3
  6833.                                     cycles:    4 + d
  6834.  
  6835.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  0Ea3
  6836.                                     cycles:    4 + d
  6837.  
  6838.        Set the fs field of register D to its logical AND with the
  6839.        corresponding field of register C.  Carry is not affected.
  6840.  
  6841.  
  6842.  
  6843.  
  6844.  
  6845.  
  6846.  
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.  
  6859.  
  6860.                                  Page 104
  6861.  
  6862.  
  6863.  
  6864.  
  6865.        D=D+1  fs  -  Increment D
  6866.        ---------
  6867.        fs = A                       opcode:  E7
  6868.                                     cycles:    7
  6869.  
  6870.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba7
  6871.                                     cycles:    3 + d
  6872.  
  6873.        Increment the specified fs field of register D by one.
  6874.        Adjusts Carry.
  6875.  
  6876.  
  6877.  
  6878.  
  6879.  
  6880.        D=D+C  fs  -  Sum of D and C into D
  6881.        ---------
  6882.        fs = A                       opcode:  C3
  6883.                                     cycles:    7
  6884.  
  6885.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa3
  6886.                                     cycles:    3 + d
  6887.  
  6888.        Set the specified fs field of register D to the sum of
  6889.        itself and the corresponding field of register C. Adjusts
  6890.        Carry.
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.        D=D+D  fs  -  Sum of D and D into D
  6897.  
  6898.        ---------
  6899.        fs = A                       opcode:  C7
  6900.                                     cycles:    7
  6901.  
  6902.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Aa7
  6903.                                     cycles:    3 + d
  6904.  
  6905.        Double the specified fs field of register D. Adjusts Carry.
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.                                  Page 105
  6927.  
  6928.  
  6929.  
  6930.  
  6931.        D=D-1  fs  -  Decrement D
  6932.        ---------
  6933.        fs = A                       opcode:  CF
  6934.                                     cycles:    7
  6935.  
  6936.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AaF
  6937.                                     cycles:    3 + d
  6938.  
  6939.        Decrement the specified fs field of register D by one.
  6940.        Adjusts Carry.
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.        D=D-C  fs  -  D minus C into D
  6947.        ---------
  6948.        fs = A                       opcode:  E3
  6949.                                     cycles:    7
  6950.  
  6951.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Ba3
  6952.                                     cycles:    3 + d
  6953.  
  6954.        Set the specified fs field of register D to the difference
  6955.        between itself and the corresponding field of register C.
  6956.        Adjusts Carry.
  6957.  
  6958.  
  6959.  
  6960.  
  6961.  
  6962.        DAT0=A fsd -  Load memory from A
  6963.        ---------
  6964.        fs = A                       opcode:  140
  6965.                                     cycles:   17
  6966.  
  6967.        fs = B                       opcode:  148
  6968.                                     cycles:   14
  6969.  
  6970.        fs = (P,WP,XS,X,S,M,W)       opcode:  150a
  6971.                                     cycles:   16 + d
  6972.  
  6973.        fs = d                       opcode:  158x (x=d-1)
  6974.                                     cycles:   15 + d
  6975.  
  6976.        The amount of data (d nibbles) specified by fsd will be
  6977.        written to the memory address pointed to by D0 from the
  6978.        specified field of register A.  The lowest-order nibble of
  6979.        the register field will be written to the lowest-addressed
  6980.        nibble of memory, proceeding toward the higher-order
  6981.        nibbles. If fs = d, d nibbles are written to memory starting
  6982.        from nibble 0 of the register. See the section on "Storing
  6983.        Data Into Memory".
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.                                  Page 106
  6993.  
  6994.  
  6995.  
  6996.  
  6997.        DAT0=C fsd  -  Store into memory from C
  6998.        ---------
  6999.        fs = A                       opcode:  144
  7000.                                     cycles:   17
  7001.  
  7002.        fs = B                       opcode:  14C
  7003.                                     cycles:   14
  7004.  
  7005.        fs = (P,WP,XS,X,S,M,W)       opcode:  154a
  7006.                                     cycles:   16 + d
  7007.  
  7008.        fs = d                       opcode:  15Cx (x=d-1)
  7009.                                     cycles:   15 + d
  7010.  
  7011.        The amount of data (d nibbles) specified by fsd will be
  7012.        written to the memory address pointed to by D0 from the
  7013.        specified field of register C.  The lowest-order nibble of
  7014.        the register field will be written to the lowest-addressed
  7015.        nibble of memory, proceeding toward the higher-order
  7016.        nibbles. If fs = d, d nibbles are written to memory starting
  7017.        from nibble 0 of the register. See the section on "Storing
  7018.        Data Into Memory".
  7019.  
  7020.  
  7021.  
  7022.  
  7023.  
  7024.        DAT1=A fs  -  Store into memory from A
  7025.        ---------
  7026.        fs = A                       opcode:  141
  7027.                                     cycles:   17
  7028.  
  7029.        fs = B                       opcode:  149
  7030.                                     cycles:   14
  7031.  
  7032.        fs = (P,WP,XS,X,S,M,W)       opcode:  151a
  7033.                                     cycles:   16 + d
  7034.  
  7035.        fs = d                       opcode:  159x (x=d-1)
  7036.                                     cycles:   15 + d
  7037.  
  7038.        The amount of data (d nibbles) specified by fsd will be
  7039.        written to the memory address pointed to by D1 from the
  7040.        specified field of register A.  The lowest-order nibble of
  7041.        the register field will be written to the lowest-addressed
  7042.        nibble of memory, proceeding toward the higher-order
  7043.        nibbles. If fs = d, d nibbles are written to memory starting
  7044.        from nibble 0 of the register. See the section on "Storing
  7045.        Data Into Memory".
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.                                  Page 107
  7059.  
  7060.  
  7061.  
  7062.  
  7063.        DAT1=C fsd -  Store into memory from C
  7064.        ---------
  7065.        fs = A                       opcode:  145
  7066.                                     cycles:   17
  7067.  
  7068.        fs = B                       opcode:  14D
  7069.                                     cycles:   14
  7070.  
  7071.        fs = (P,WP,XS,X,S,M,W)       opcode:  155a
  7072.                                     cycles:   16 + d
  7073.  
  7074.        fs = d                       opcode:  15Dx (x=d-1)
  7075.                                     cycles:   15 + d
  7076.  
  7077.        The amount of data (d nibbles) specified by fsd will be
  7078.        written to the memory address pointed to by D1 from the
  7079.        specified field of register C.  The lowest-order nibble of
  7080.        the register field will be written to the lowest-addressed
  7081.        nibble of memory, proceeding toward the higher-order
  7082.        nibbles. If fs = d, d nibbles are written to memory starting
  7083.        from nibble 0 of the register. See the section on "Storing
  7084.        Data Into Memory".
  7085.  
  7086.  
  7087.  
  7088.  
  7089.  
  7090.        DCEX   fs  -  Exchange Registers D and C
  7091.        ---------
  7092.        fs = A                       opcode:  DF
  7093.                                     cycles:    7
  7094.  
  7095.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  AbF
  7096.                                     cycles:    3 + d
  7097.  
  7098.        Exchange the fs fields of registers of D and C. Carry is not
  7099.        affected.
  7100.  
  7101.  
  7102.  
  7103.  
  7104.  
  7105.        DSL    fs  -  D Shift Left
  7106.        ---------
  7107.        fs = A                       opcode:  F3
  7108.                                     cycles:    7
  7109.  
  7110.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb3
  7111.                                     cycles:    3 + d
  7112.  
  7113.        Shift the contents of the specified fs field of register D
  7114.        left one nibble, without affecting the rest of the register.
  7115.        The nibble shifted off the left end of the field is lost.
  7116.        The new low-order nibble of the field is zero. The Sticky
  7117.        Bit (SB) is not affected.
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.                                  Page 108
  7125.  
  7126.  
  7127.  
  7128.  
  7129.        DSLC      - D Shift Left Circular
  7130.        ---------
  7131.                                     opcode:  813
  7132.                                     cycles:   21
  7133.  
  7134.        Circular shift register D left one nibble.  Operates on all
  7135.        16 digits.  The Sticky Bit (SB) is not affected.
  7136.  
  7137.  
  7138.  
  7139.  
  7140.  
  7141.        DSR    fs  -  D Shift Right
  7142.        ---------
  7143.        fs = A                       opcode:  F7
  7144.                                     cycles:    7
  7145.  
  7146.        fs = (P,WP,XS,X,S,M,B,W)     opcode:  Bb7
  7147.                                     cycles:    3 + d
  7148.  
  7149.        Shift the contents of the specified fs field of register D
  7150.        right one nibble, without affecting the rest of the
  7151.        register. The nibble shifted off the right end of the field
  7152.        is lost, but the Sticky Bit (SB) is set if the nibble was
  7153.        non-zero.  The new high-order nibble of the field is zero.
  7154.  
  7155.  
  7156.  
  7157.  
  7158.  
  7159.        DSRB      - D Shift Right Bit
  7160.        ---------
  7161.                                     opcode:  81F
  7162.                                     cycles:   20
  7163.  
  7164.        Shift register D right one bit.  Operates on all 16 digits.
  7165.        The bit shifted off the end is lost, but the Sticky Bit (SB)
  7166.        is set if it was non-zero.  The new high-order bit of the
  7167.        register is zero.
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.        DSRC      - D Shift Right Circular
  7174.        ---------
  7175.                                     opcode:  817
  7176.                                     cycles:   21
  7177.  
  7178.        Circular shift register D right one nibble.  Operates on all
  7179.        16 digits. The Sticky Bit (SB) is set if the nibble shifted
  7180.        from low-order around to high-order position was non-zero.
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.                                  Page 109
  7191.  
  7192.  
  7193.  
  7194.  
  7195.        GOC    label - Go relative on carry
  7196.        ----------
  7197.                                     opcode:  4aa (Carry=0)
  7198.                                     cycles:   10 (GO)
  7199.                                                3 (NO)
  7200.  
  7201.        Short relative jump to label if Carry is set. label must be
  7202.        in the range:
  7203.  
  7204.        addr - 128  <=  label  <=  addr + 127
  7205.  
  7206.        where addr is the address of the second nibble of the
  7207.        opcode. The address offset aa is in two's complement form
  7208.        and is relative to addr.
  7209.  
  7210.  
  7211.  
  7212.  
  7213.  
  7214.        GOLONG label  - Go Long
  7215.        -------------
  7216.                                     opcode:  8Caaaa
  7217.                                     cycles:   14
  7218.  
  7219.        Long relative jump to label unconditionally.  label must be
  7220.        in the range:
  7221.  
  7222.        addr - 32768  <=  label  <=  addr + 32767
  7223.  
  7224.        where addr is the address of the third nibble of the opcode.
  7225.        The address offset aaaa is in two's complement form and is
  7226.        relative to addr.
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.        GONC   label - Go relative on no carry
  7233.        ----------
  7234.                                     opcode:  5aa (Carry=1)
  7235.                                     cycles:   10 (GO)
  7236.                                                3 (NO)
  7237.  
  7238.        Short relative jump to label if Carry is clear. label must
  7239.        be in the range:
  7240.  
  7241.        addr - 128  <=  label  <=  addr + 127
  7242.  
  7243.        where addr is the address of the second nibble of the
  7244.        opcode. The address offset aa is in two's complement form
  7245.        and is relative to addr.
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.                                  Page 110
  7257.  
  7258.  
  7259.  
  7260.  
  7261.        GOSBVL label   - Gosub very long to label
  7262.        -------------
  7263.                                     opcode:  8Faaaaa
  7264.                                     cycles:   15
  7265.  
  7266.        Absolute subroutine jump to aaaaa, which is the absolute
  7267.        address of label.  See the GOSUB mnemonic.
  7268.  
  7269.  
  7270.  
  7271.  
  7272.  
  7273.        GOSUB  label - Gosub to label
  7274.        ------------
  7275.                                     opcode:  7aaa
  7276.                                     cycles:   12
  7277.  
  7278.        Relative subroutine jump to label.  label must be in the
  7279.        range:
  7280.  
  7281.                    addr - 2048 <= label <= addr + 2047
  7282.  
  7283.        where addr is the starting address of the next instruction.
  7284.        The address offset aaa is in two's complement form and is
  7285.        relative to addr.
  7286.  
  7287.        As with all subroutine jumps, the address (addr) of the
  7288.        instruction following the gosub opcode is pushed onto the
  7289.        hardware return stack, so that when a corresponding return
  7290.        is executed, control resumes with the instruction at address
  7291.        addr.
  7292.  
  7293.        As the return address is pushed onto the return stack, the
  7294.        bottom-most address on the stack is discarded.  Therefore,
  7295.        the return stack always contains 8 addresses, and if pushes
  7296.        exceed pops by 8 levels, the bottom-most return addresses
  7297.        are lost. Since the interrupt system requires one level to
  7298.        process interrupts, only 7 levels of the return stack can be
  7299.        used by code which must execute when interrupts are enabled.
  7300.        See the RTN mnemonic for further information.
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.        GOSUBL label   - Gosub long to label
  7307.        -------------
  7308.                                     opcode:  8Eaaaa
  7309.                                     cycles:   15
  7310.  
  7311.        Long relative subroutine jump to label.  label must be in
  7312.        the range:
  7313.  
  7314.                   addr - 32768  <= label <= addr + 32767
  7315.  
  7316.        where addr is the starting address of the next instruction.
  7317.        The address offset aaaa is in two's complement form and is
  7318.        relative to addr. See the GOSUB mnemonic.
  7319.  
  7320.  
  7321.  
  7322.                                  Page 111
  7323.  
  7324.  
  7325.  
  7326.  
  7327.        GOTO   label - Jump relative
  7328.        -----------
  7329.                                     opcode:  6aaa
  7330.                                     cycles:   11
  7331.  
  7332.        Relative jump to label unconditionally. label must be in the
  7333.        range:
  7334.  
  7335.        addr - 2048  <=  label  <=  addr + 2047
  7336.  
  7337.        where addr is the address of the second nibble of the
  7338.        opcode. The address offset aaa is in two's complement form
  7339.        and is relative to addr.
  7340.  
  7341.  
  7342.  
  7343.  
  7344.  
  7345.        GOVLNG label  - Jump very long
  7346.        -------------
  7347.                                     opcode:  8Daaaaa
  7348.                                     cycles:   14
  7349.  
  7350.        Unconditional jump to aaaaa, which is the absolute address
  7351.        of label.
  7352.  
  7353.  
  7354.  
  7355.  
  7356.  
  7357.        GOYES  label  - Jump if Test is True
  7358.        -----
  7359.                                     opcode:  yy
  7360.                                     cycles:   included in the accompaning
  7361.                                               Test mnemonic cycle time.
  7362.  
  7363.        GOYES is a mnemonic to specify part of a CPU test opcode.
  7364.        GOYES must always follow a test mnemonic.  If the condition
  7365.        of the test is met, a jump is performed to label with Carry
  7366.        set.  label must be in the range
  7367.  
  7368.                     addr - 128 <= label <= addr + 127
  7369.  
  7370.        where addr is the starting address of the jump offset yy. If
  7371.        the test condition is not met, Carry is cleared and control
  7372.        passes to the next instruction. Compare with RTNYES.
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.                                  Page 112
  7389.  
  7390.  
  7391.  
  7392.  
  7393.        INTOFF     - Interrupt Off
  7394.        ----------
  7395.                                     opcode:  808F
  7396.                                     cycles:    5
  7397.  
  7398.        Disable the keyboard interrupt system.
  7399.  
  7400.  
  7401.  
  7402.  
  7403.  
  7404.  
  7405.        INTON    - Interrupt On
  7406.        --------
  7407.                                     opcode:  8080
  7408.                                     cycles:    5
  7409.  
  7410.        Enable the keyboard interrupt system. See the "Hp-71
  7411.        Hardware Specification" for more information.
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.        LC(m)  n..n - Load C with constant (1<=m<=6)
  7418.        -----------
  7419.                                     opcode:  3xn..n (x=m-1)
  7420.                                     cycles:    3+m
  7421.  
  7422.        Load m digits of the expression n..n to the C register
  7423.        beginning at the P pointer position, and proceeding toward
  7424.        higher-order nibbles, with the ability to wrap around the
  7425.        register.  See the section on "Loading Data From Memory".
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.        LCASC  A..A  - Load C with ASCII constant
  7432.        -------------
  7433.                                     opcode:  3mc..c
  7434.                                                (m    = 2*(# of chars)-1;
  7435.                                                 c..c = ASCII codes)
  7436.                                     cycles:    3+2*(# of chars)
  7437.  
  7438.        Load up to 8 ASCII characters to the C register beginning at
  7439.        the P pointer position, and proceeding toward higher-order
  7440.        nibbles, with the ability to wrap around the register.  Each
  7441.        A represents an ASCII character.  The ASCII characters are
  7442.        stored in the opcode in reverse order so that when the
  7443.        instruction is executed the data will be loaded into the
  7444.        register with the intended orientation.  See the section on
  7445.        "Loading Data From Memory".
  7446.  
  7447.  
  7448.  
  7449.  
  7450.  
  7451.  
  7452.  
  7453.  
  7454.                                  Page 113
  7455.  
  7456.  
  7457.  
  7458.  
  7459.        LCHEX  h..h - Load C with hex constant
  7460.        -----------
  7461.                                     opcode:  3nh..h (n=# of digits-1)
  7462.                                     cycles:    4+n
  7463.  
  7464.        Load up to 16 hex digits into the C register beginning at
  7465.        the P pointer position, and proceeding toward higher-order
  7466.        nibbles, with the ability to wrap around the register.  The
  7467.        hex digits are stored in the opcode in reverse order so that
  7468.        when the instruction is executed the data will be loaded
  7469.        into the register with the intended orientation.  See the
  7470.        section on "Loading Data From Memory".
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.        MP=0      - Clear Module Pulled bit (MP)
  7477.        ---------
  7478.                                     opcode:  828
  7479.                                     cycles:    3
  7480.  
  7481.        Clears the Module Pulled bit (MP) and pulls the Module
  7482.        Pulled Interrupt line low. See CLRHST mnemonic.
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.        NOP3       - Three nibble No-op
  7489.        ----
  7490.                                     opcode:  420
  7491.                                     cycles:  10 (GO/RTNYES)
  7492.                                               3 (NO)
  7493.  
  7494.        This mnemonic generates a GOC to the next instruction,
  7495.        effectively skiping three nibbles.
  7496.  
  7497.  
  7498.  
  7499.  
  7500.  
  7501.  
  7502.  
  7503.  
  7504.  
  7505.  
  7506.  
  7507.  
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.                                  Page 114
  7521.  
  7522.  
  7523.  
  7524.  
  7525.        NOP4       - Four nibble No-op
  7526.        ----
  7527.                                     opcode:  6300
  7528.                                     cycles:   11
  7529.  
  7530.        This mnemonic generates a GOTO to the next instruction,
  7531.        efectively skiping four nibbles.
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.        NOP5       - Five nibble No-op
  7538.        ----
  7539.                                     opcode:  64000
  7540.                                     cycles:    11
  7541.  
  7542.        This mnemonic generates a relative GOTO to +4 nibbles. The
  7543.        fifth nibble in the opcode is a place holder and is jumped
  7544.        over.  The mnemonic effectively skips five nibbles.
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.        OUT=C      - Load 3 nibbles of OR -----
  7551.                                     opcode:  801
  7552.                                     cycles:    6
  7553.  
  7554.        All nibbles of the Output register are loaded with the low-
  7555.        order three nibbles of C (X field).
  7556.  
  7557.  
  7558.  
  7559.  
  7560.  
  7561.  
  7562.  
  7563.        OUT=CS  - Load 1 nibble of OR
  7564.        ------
  7565.                                     opcode:  800
  7566.                                     cycles:    4
  7567.  
  7568.        The least significant nibble of the Output register is
  7569.        loaded with the least significant nibble of the C register.
  7570.  
  7571.  
  7572.  
  7573.  
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.                                  Page 115
  7587.  
  7588.  
  7589.  
  7590.  
  7591.        PC=(A)      - Jump (Set PC) indirectly thru A field of A register
  7592.        ---------
  7593.                                     opcode:  808C
  7594.                                     cycles:    23
  7595.  
  7596.        This instruction causes the CPU to jump to the address
  7597.        pointed to by memory at the address specified by the A field
  7598.        of the A register.  In symbolic form, the operation is
  7599.        PC=mem(A[A]).  This opcode is not available on the 1LF2
  7600.        version of the Saturn CPU.
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.        P=C    n    - Copy P pointer into C at Nibble n
  7607.        ---------
  7608.                                     opcode:  80Dn
  7609.                                     cycles:    6
  7610.  
  7611.        Copy nibble n of register C into the P pointer.
  7612.  
  7613.  
  7614.  
  7615.  
  7616.  
  7617.        P=P+1     - Increment P Pointer
  7618.        ---------
  7619.                                     opcode:  0C
  7620.                                     cycles:    3
  7621.  
  7622.        Increment the P pointer.  If P is incremented past F it will
  7623.        automatically wrap around to 0. This instruction is always
  7624.        executed in HEX mode.  Adjusts carry.
  7625.  
  7626.  
  7627.  
  7628.  
  7629.  
  7630.        P=P-1     - Decrement P Pointer
  7631.        ---------
  7632.                                     opcode:  0D
  7633.                                     cycles:    3
  7634.  
  7635.        Decrement the P pointer. If P is decremented past 0 it
  7636.        automatically wraps around to F. This instruction is always
  7637.        executed in HEX mode.  Adjusts Carry.
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.                                  Page 116
  7653.  
  7654.  
  7655.  
  7656.  
  7657.        P=     n    - Set P Pointer to n
  7658.        ---------
  7659.                                     opcode:  2n
  7660.                                     cycles:    2
  7661.  
  7662.        Set the P pointer to n.
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.        R0=A      - Copy A to register R0
  7669.        ---------
  7670.                                     opcode:  100
  7671.                                     cycles:   19
  7672.  
  7673.        The contents of the working register A is copied to the
  7674.        scratch register R0.
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.        R0=C      - Copy C to register R0
  7681.        ---------
  7682.                                     opcode:  108
  7683.                                     cycles:   19
  7684.  
  7685.        The contents of the working register C is copied to the
  7686.        scratch register R0.
  7687.  
  7688.  
  7689.  
  7690.  
  7691.  
  7692.        R1=A      - Copy A to register R1
  7693.        ---------
  7694.                                     opcode:  101
  7695.                                     cycles:   19
  7696.  
  7697.        The contents of the working register A is copied to the
  7698.        scratch register R1.
  7699.  
  7700.  
  7701.  
  7702.  
  7703.  
  7704.  
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.                                  Page 117
  7719.  
  7720.  
  7721.  
  7722.  
  7723.        R1=C      - Copy C to register R1
  7724.        ---------
  7725.                                     opcode:  109
  7726.                                     cycles:   19
  7727.  
  7728.        The contents of the working register C is copied to the
  7729.        scratch register R1.
  7730.  
  7731.  
  7732.  
  7733.  
  7734.  
  7735.        R2=A      - Copy A to register R2
  7736.        ---------
  7737.                                     opcode:  102
  7738.                                     cycles:   19
  7739.  
  7740.        The contents of the working register A is copied to the
  7741.        scratch register R2.
  7742.  
  7743.  
  7744.  
  7745.  
  7746.  
  7747.        R2=C      - Copy C to register R2
  7748.        ---------
  7749.                                     opcode:  10A
  7750.                                     cycles:   19
  7751.  
  7752.        The contents of the working register C is copied to the
  7753.        scratch register R2.
  7754.  
  7755.  
  7756.  
  7757.  
  7758.  
  7759.        R3=A      - Copy A to register R3
  7760.        ---------
  7761.                                     opcode:  103
  7762.                                     cycles:   19
  7763.  
  7764.        The contents of the working register A is copied to the
  7765.        scratch register R3.
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.                                  Page 118
  7785.  
  7786.  
  7787.  
  7788.  
  7789.        R3=C      - Copy C to register R3
  7790.        ---------
  7791.                                     opcode:  10B
  7792.                                     cycles:   19
  7793.  
  7794.        The contents of the working register C is copied to the
  7795.        scratch register R3.
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.        R4=A      - Copy A to register R4
  7802.        ---------
  7803.                                     opcode:  104
  7804.                                     cycles:   19
  7805.  
  7806.        The contents of the working register A is copied to the
  7807.        scratch register R4.
  7808.  
  7809.  
  7810.  
  7811.  
  7812.  
  7813.        R4=C      - Copy C to register R4
  7814.        ---------
  7815.                                     opcode:  10C
  7816.                                     cycles:   19
  7817.  
  7818.        The contents of the working register C is copied to the
  7819.        scratch register R4.
  7820.  
  7821.  
  7822.  
  7823.  
  7824.  
  7825.        RESET     - System reset
  7826.        ---------
  7827.                                     opcode:  80A
  7828.                                     cycles:    6
  7829.  
  7830.        The System Reset Bus Command is issued with all chips
  7831.        performing a local reset.  The reset function will vary
  7832.        according to the chip type.
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  
  7850.                                  Page 119
  7851.  
  7852.  
  7853.  
  7854.  
  7855.        RSI       - Reset Interrupt System
  7856.        ---------
  7857.                                     opcode:  80810
  7858.                                     cycles:    6
  7859.  
  7860.        This instruction causes CPU to consider any input line (ie
  7861.        input register bits) presently high as a new interrupt.  If
  7862.        the CPU is presently in the interrupt routine it will wait
  7863.        for an RTI before vectoring, otherwise the CPU will vector
  7864.        immediately following the RSI instruction.  For a complete
  7865.        discussion on the interrupt system see the CPU Hardware
  7866.        Specification (A-1LK7-9005-1).  This instruction is not
  7867.        available on the 1LF2 version of the Saturn CPU.
  7868.  
  7869.  
  7870.  
  7871.  
  7872.  
  7873.        RSTK=C    - Push C to Return Stack
  7874.        ---------
  7875.                                     opcode:  06
  7876.                                     cycles:    8
  7877.  
  7878.        Push the low-order 5 nibbles (A field) of the C register
  7879.        onto the Return Stack. See the GOSUB mnemonic.
  7880.  
  7881.  
  7882.  
  7883.  
  7884.  
  7885.        RTI       - Return from interrupt
  7886.        ---------
  7887.                                     opcode:  0F
  7888.                                     cycles:    9
  7889.  
  7890.        Return and re-enable the interrupt system.  See the RTN
  7891.        mnemonic.
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.        RTN        - Return
  7899.        ---------
  7900.                                     opcode:  01
  7901.                                     cycles:    9
  7902.  
  7903.        Return control to the top address on the hardware return
  7904.        stack. The top address on the hardware return stack is
  7905.        popped off and placed in the program counter PC.  As the
  7906.        address is popped off the stack, a zero address is inserted
  7907.        at the bottom of the stack.
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.                                  Page 120
  7917.  
  7918.  
  7919.  
  7920.  
  7921.        Therefore the the hardware return stack always contains 8
  7922.        addresses, and if more pops (returns) than pushes (gosubs)
  7923.        are performed, zeros will be read off the stack.  Such an
  7924.        attempt to "return" to address 0 results in a memory reset,
  7925.        since the memory reset code of the operating system resides
  7926.        at address 0.
  7927.  
  7928.  
  7929.  
  7930.  
  7931.  
  7932.        RTNC      -Return on carry
  7933.        ---------
  7934.                                     opcode:  400
  7935.                                     cycles:   10 (RTN)
  7936.                                                3 (NO)
  7937.  
  7938.        Return if Carry is set. See RTN mnemonic.
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.        RTNCC     - Return, clear carry
  7945.        ---------
  7946.                                     opcode:  03
  7947.                                     cycles:    9
  7948.  
  7949.        Return and set Carry. See RTN mnemonic.
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.        RTNNC   - Return on no carry
  7956.        -------
  7957.                                     opcode:  500 (Carry=1)
  7958.                                     cycles:   10 (RTN)
  7959.                                                3 (NO)
  7960.  
  7961.        Return if Carry is not set.  See RTN mnemonic.
  7962.  
  7963.  
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.                                  Page 121
  7983.  
  7984.  
  7985.  
  7986.  
  7987.        RTNSC     - Return, set carry
  7988.        ---------
  7989.                                     opcode:  02
  7990.                                     cycles:    9
  7991.  
  7992.        Return and set Carry.  See RTN mnemonic.
  7993.  
  7994.  
  7995.  
  7996.  
  7997.  
  7998.        RTNSXM    - Return, set External Module Missing bit (XM)
  7999.        ---------
  8000.                                     opcode:  00
  8001.                                     cycles:    9
  8002.  
  8003.        Return and set the External Module Missing bit (XM).  Since
  8004.        the opcode is zero, this mnemonic is executed on a jump to a
  8005.        non-existent memory device.  See the "HP-71 Hardware
  8006.        Specification" for more information.  See also the RTN
  8007.        mnemonic.
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.        RTNYES  - Return if Test is True
  8014.        ---------
  8015.                                     opcode:  00
  8016.                                     cycles:  included in the accompaning
  8017.                                              mnemonic cycle time.
  8018.  
  8019.        RTNYES is a mnemonic to specify part of a CPU test opcode.
  8020.        RTNYES must always follow a test mnemonic.  If the test
  8021.        condition is met, Carry is set and a return is executed. If
  8022.        the test condition is not met, control passes to the
  8023.        instruction following the RTNYES.  Compare with the RTN and
  8024.        GOYES mnemonics.
  8025.  
  8026.  
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.                                  Page 122
  8049.  
  8050.  
  8051.  
  8052.  
  8053.        SB=0      - Clear Sticky Bit (SB)
  8054.        ---------
  8055.                                     opcode:  822
  8056.                                     cycles:    3
  8057.  
  8058.        Clear the Sticky Bit (SB).  See CLRHST mnemonic.
  8059.  
  8060.  
  8061.  
  8062.  
  8063.  
  8064.  
  8065.        SETDEC    - Set decimal
  8066.        ---------
  8067.                                     opcode:  05
  8068.                                     cycles:    3
  8069.  
  8070.        Set CPU arithmetic mode to decimal.
  8071.  
  8072.  
  8073.  
  8074.  
  8075.  
  8076.        SETHEX    - Set hexadecimal mode
  8077.        ---------
  8078.                                     opcode:  04
  8079.                                     cycles:    3
  8080.  
  8081.        Set CPU arithmetic mode to hexadecimal.
  8082.  
  8083.  
  8084.  
  8085.  
  8086.  
  8087.        SHUTDN    - System Shutdown
  8088.        ---------
  8089.                                     opcode:  807
  8090.                                     cycles:    5
  8091.  
  8092.        When this mnemonic is executed the CPU sends out the
  8093.        Shutdown Bus Command and stops its clock.  Issuing the
  8094.        SHUTDN command with the output register=000 (see OUT=C or
  8095.        OUT=CS) will cause the PC to be set to zero, causing an
  8096.        automatic cold-start in some systems, or a system halt
  8097.        in the HP 48.
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.                                  Page 123
  8115.  
  8116.  
  8117.  
  8118.  
  8119.        SR=0      - Clear Service Request bit (SR)
  8120.        ---------
  8121.                                     opcode:  824
  8122.                                     cycles:    3
  8123.  
  8124.        Clear the Service Request bit (SR).  See the CLRHST
  8125.        mnemonic.
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.        SREQ?     - Service Request
  8132.        ---------
  8133.                                     opcode:  80E
  8134.                                     cycles:    7
  8135.  
  8136.        This mnemonic sets the Service Request bit (SR) if any chip
  8137.        on the system bus requests service.  When it is executed, a
  8138.        Service Request Bus Command is issued on the system bus to
  8139.        poll all chips for a Service Request.  If any chip requests
  8140.        service, a bus line will be pulled high during the next
  8141.        strobe following the Service Request Bus Command.  This
  8142.        value of the bus will be latched into the least significant
  8143.        nibble of the C register. The bus line pulled high
  8144.        determines the device type according to the following table.
  8145.  
  8146.                  Bit           Device
  8147.                  ---   ------------------------
  8148.                   3     Unused
  8149.                   2     Card Reader
  8150.                   1     HP-IL Mailbox
  8151.                   0     Display Driver (timer)
  8152.  
  8153.        If any bus line is high, the Service Request bit (SR) will
  8154.        be set. See the "HP-71 Hardware Specification" for more
  8155.        information. See also the ?SREQ and SR=0 mnemonics.
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.                                  Page 124
  8181.  
  8182.  
  8183.  
  8184.  
  8185.        ST=0   n  - Clear Program Status bit n
  8186.        ---------
  8187.                                     opcode:  84n
  8188.                                     cycles:    4
  8189.  
  8190.        Clear the Program Status bit selected by n.
  8191.  
  8192.  
  8193.  
  8194.  
  8195.        ST=1   n  - Set Program Status bit n
  8196.        ---------
  8197.                                     opcode:  85n
  8198.                                     cycles:    4
  8199.  
  8200.        Set the Program Status bit selected by n.
  8201.  
  8202.  
  8203.  
  8204.  
  8205.  
  8206.  
  8207.  
  8208.        ST=C      - C to Status
  8209.        ---------
  8210.                                     opcode:  0A
  8211.                                     cycles:    6
  8212.  
  8213.        Copy the low-order 12 bits of the Status register (X field)
  8214.        into the low-order 12 bits  of the C register.
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.        UNCNFG    - Unconfigure
  8221.        ---------
  8222.                                     opcode:  804
  8223.                                     cycles:   12
  8224.  
  8225.        Load the low-order 5 nibbles (A field) of the C register
  8226.        into each Data pointer with the device addressed by the Data
  8227.        pointer unconfiguring.  See the "HP-71 Hardware
  8228.        Specification" for more information.
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.        XM=0      - Clear External Module Missing bit (XM)
  8235.        ---------
  8236.                                     opcode:  821
  8237.                                     cycles:    3
  8238.  
  8239.        Clear the External Module Missing bit (XM).  This hardware
  8240.        status bit is set by the RTNSXM mnemonic.  See the CLRHST
  8241.        mnemonic.
  8242.  
  8243.  
  8244.  
  8245.  
  8246.                                  Page 125
  8247.  
  8248.  
  8249.  
  8250.  
  8251.        9.  Alphabetic Mnemonic List
  8252.  
  8253.  
  8254.        This chapter contains all the code-generating instructions
  8255.        which are recognized by SASM.EXE.  Instructions found in the
  8256.        HP 28 and HP 48 but not the HP 71 are marked with **.
  8257.  
  8258.        Symbols used in modifier field:
  8259.  
  8260.        fs      Field Select character.
  8261.        rfs     Restricted Field Selection (S,P,WP, and XS not allowed).
  8262.        d       Single-nibble field.
  8263.        expr    Expression.
  8264.        hh      Two-digit hexadecimal value.
  8265.        hhhh    Four-digit hexadecimal value.
  8266.        hhhhh   Five-digit hexadecimal value.
  8267.        label   Label destination.
  8268.        ASCII   ASCII character string.
  8269.  
  8270.        Symbols used in code field:
  8271.  
  8272.        tt      Code included in test instruction.
  8273.        a       Field select in the range 0-7.
  8274.        b       Field select in the range 8-F.
  8275.        c       Single-nibble length field (Load Constant).
  8276.        f       Field select including A field.
  8277.        h...h   Hexadecimal value.
  8278.        n       Nibble whose value is d.
  8279.        n...n   Nibbles whose value is expr.
  8280.        m       Nibble whose value is d - 1.
  8281.        x...x   Nibbles corresponding to ASCII characters.
  8282.        y       Reference to a symbol (relative or absolute).
  8283.  
  8284.  
  8285.        Instruction     Code    Comments
  8286.  
  8287.        ?A#0    A       8ACyy   Requires GOYES or RTNYES; Affects Carry
  8288.        ?A#0    fs      9aCyy   Requires GOYES or RTNYES; Affects Carry
  8289.        ?A#B    A       8A4yy   Requires GOYES or RTNYES; Affects Carry
  8290.        ?A#B    fs      9a4yy   Requires GOYES or RTNYES; Affects Carry
  8291.        ?A#C    A       8A6yy   Requires GOYES or RTNYES; Affects Carry
  8292.        ?A#C    fs      9a6yy   Requires GOYES or RTNYES; Affects Carry
  8293.        ?A<=B   A       8BCyy   Requires GOYES or RTNYES; Affects Carry
  8294.        ?A<=B   fs      9bCyy   Requires GOYES or RTNYES; Affects Carry
  8295.        ?A<=C   A       8BAyy   Requires GOYES or RTNYES; Affects Carry
  8296.        ?A<=C   fs      9bAyy   Requires GOYES or RTNYES; Affects Carry
  8297.        ?A<B    A       8B4yy   Requires GOYES or RTNYES; Affects Carry
  8298.        ?A<B    fs      9b4yy   Requires GOYES or RTNYES; Affects Carry
  8299.        ?A<C    A       8B2yy   Requires GOYES or RTNYES; Affects Carry
  8300.        ?A<C    fs      9b2yy   Requires GOYES or RTNYES; Affects Carry
  8301.        ?A=0    A       8A8yy   Requires GOYES or RTNYES; Affects Carry
  8302.        ?A=0    fs      9a8yy   Requires GOYES or RTNYES; Affects Carry
  8303.        ?A=B    A       8A0yy   Requires GOYES or RTNYES; Affects Carry
  8304.        ?A=B    fs      9a0yy   Requires GOYES or RTNYES; Affects Carry
  8305.        ?A=C    A       8A2yy   Requires GOYES or RTNYES; Affects Carry
  8306.        ?A=C    fs      9a2yy   Requires GOYES or RTNYES; Affects Carry
  8307.        ?A>=B   A       8B8yy   Requires GOYES or RTNYES; Affects Carry
  8308.        ?A>=B   fs      9b8yy   Requires GOYES or RTNYES; Affects Carry
  8309.  
  8310.  
  8311.  
  8312.                                  Page 126
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.        ?A>=C   A       8BEyy   Requires GOYES or RTNYES; Affects Carry
  8320.        ?A>=C   fs      9bEyy   Requires GOYES or RTNYES; Affects Carry
  8321.        ?A>B    A       8B0yy   Requires GOYES or RTNYES; Affects Carry
  8322.        ?A>B    fs      9b0yy   Requires GOYES or RTNYES; Affects Carry
  8323.        ?A>C    A       8B6yy   Requires GOYES or RTNYES; Affects Carry
  8324.        ?A>C    fs      9b6yy   Requires GOYES or RTNYES; Affects Carry
  8325.        ?ABIT=0 d       8086nyy ** Requires GOYES or RTNYES; Affects Carry
  8326.        ?ABIT=1 d       8087nyy ** Requires GOYES or RTNYES; Affects Carry
  8327.        ?B#0    A       8ADyy   Requires GOYES or RTNYES; Affects Carry
  8328.        ?B#0    fs      9aDyy   Requires GOYES or RTNYES; Affects Carry
  8329.        ?B#A    A       8A4yy   Requires GOYES or RTNYES; Affects Carry
  8330.        ?B#A    fs      9a4yy   Requires GOYES or RTNYES; Affects Carry
  8331.        ?B#C    A       8A5yy   Requires GOYES or RTNYES; Affects Carry
  8332.        ?B#C    fs      9a5yy   Requires GOYES or RTNYES; Affects Carry
  8333.        ?B<=A   A       8B8yy   Requires GOYES or RTNYES; Affects Carry
  8334.        ?B<=A   fs      9b8yy   Requires GOYES or RTNYES; Affects Carry
  8335.        ?B<=C   A       8BDyy   Requires GOYES or RTNYES; Affects Carry
  8336.        ?B<=C   fs      9bDyy   Requires GOYES or RTNYES; Affects Carry
  8337.        ?B<A    A       8B0yy   Requires GOYES or RTNYES; Affects Carry
  8338.        ?B<A    fs      9b0yy   Requires GOYES or RTNYES; Affects Carry
  8339.        ?B<C    A       8B5yy   Requires GOYES or RTNYES; Affects Carry
  8340.        ?B<C    fs      9b5yy   Requires GOYES or RTNYES; Affects Carry
  8341.        ?B=0    A       8A9yy   Requires GOYES or RTNYES; Affects Carry
  8342.        ?B=0    fs      9a9yy   Requires GOYES or RTNYES; Affects Carry
  8343.        ?B=A    A       8A0yy   Requires GOYES or RTNYES; Affects Carry
  8344.        ?B=A    fs      9a0yy   Requires GOYES or RTNYES; Affects Carry
  8345.        ?B=C    A       8A1yy   Requires GOYES or RTNYES; Affects Carry
  8346.        ?B=C    fs      9a1yy   Requires GOYES or RTNYES; Affects Carry
  8347.        ?B>=A   A       8BCyy   Requires GOYES or RTNYES; Affects Carry
  8348.        ?B>=A   fs      9bCyy   Requires GOYES or RTNYES; Affects Carry
  8349.        ?B>=C   A       8B9yy   Requires GOYES or RTNYES; Affects Carry
  8350.        ?B>=C   fs      9b9yy   Requires GOYES or RTNYES; Affects Carry
  8351.        ?B>A    A       8B4yy   Requires GOYES or RTNYES; Affects Carry
  8352.        ?B>A    fs      9b4yy   Requires GOYES or RTNYES; Affects Carry
  8353.        ?B>C    A       8B1yy   Requires GOYES or RTNYES; Affects Carry
  8354.        ?B>C    fs      9b1yy   Requires GOYES or RTNYES; Affects Carry
  8355.        ?C#0    A       8AEyy   Requires GOYES or RTNYES; Affects Carry
  8356.        ?C#0    fs      9aEyy   Requires GOYES or RTNYES; Affects Carry
  8357.        ?C#A    A       8A6yy   Requires GOYES or RTNYES; Affects Carry
  8358.        ?C#A    fs      9a6yy   Requires GOYES or RTNYES; Affects Carry
  8359.        ?C#B    A       8A5yy   Requires GOYES or RTNYES; Affects Carry
  8360.        ?C#B    fs      9a5yy   Requires GOYES or RTNYES; Affects Carry
  8361.        ?C#D    A       8A7yy   Requires GOYES or RTNYES; Affects Carry
  8362.        ?C#D    fs      9a7yy   Requires GOYES or RTNYES; Affects Carry
  8363.        ?C<=A   A       8BEyy   Requires GOYES or RTNYES; Affects Carry
  8364.        ?C<=A   fs      9bEyy   Requires GOYES or RTNYES; Affects Carry
  8365.        ?C<=B   A       8B9yy   Requires GOYES or RTNYES; Affects Carry
  8366.        ?C<=B   fs      9b9yy   Requires GOYES or RTNYES; Affects Carry
  8367.        ?C<=D   A       8BByy   Requires GOYES or RTNYES; Affects Carry
  8368.        ?C<=D   fs      9bByy   Requires GOYES or RTNYES; Affects Carry
  8369.        ?C<A    A       8B6yy   Requires GOYES or RTNYES; Affects Carry
  8370.        ?C<A    fs      9b6yy   Requires GOYES or RTNYES; Affects Carry
  8371.        ?C<B    A       8B1yy   Requires GOYES or RTNYES; Affects Carry
  8372.        ?C<B    fs      9b1yy   Requires GOYES or RTNYES; Affects Carry
  8373.        ?C<D    A       8B3yy   Requires GOYES or RTNYES; Affects Carry
  8374.        ?C<D    fs      9b3yy   Requires GOYES or RTNYES; Affects Carry
  8375.  
  8376.  
  8377.  
  8378.                                  Page 127
  8379.  
  8380.  
  8381.  
  8382.  
  8383.        ?C=0    A       8AAyy   Requires GOYES or RTNYES; Affects Carry
  8384.        ?C=0    fs      9aAyy   Requires GOYES or RTNYES; Affects Carry
  8385.        ?C=A    A       8A2yy   Requires GOYES or RTNYES; Affects Carry
  8386.        ?C=A    fs      9a2yy   Requires GOYES or RTNYES; Affects Carry
  8387.        ?C=B    A       8A1yy   Requires GOYES or RTNYES; Affects Carry
  8388.        ?C=B    fs      9a1yy   Requires GOYES or RTNYES; Affects Carry
  8389.        ?C=D    A       8A3yy   Requires GOYES or RTNYES; Affects Carry
  8390.        ?C=D    fs      9a3yy   Requires GOYES or RTNYES; Affects Carry
  8391.        ?C>=A   A       8BAyy   Requires GOYES or RTNYES; Affects Carry
  8392.        ?C>=A   fs      9bAyy   Requires GOYES or RTNYES; Affects Carry
  8393.        ?C>=B   A       8BDyy   Requires GOYES or RTNYES; Affects Carry
  8394.        ?C>=B   fs      9bDyy   Requires GOYES or RTNYES; Affects Carry
  8395.        ?C>=D   A       8BFyy   Requires GOYES or RTNYES; Affects Carry
  8396.        ?C>=D   fs      9bFyy   Requires GOYES or RTNYES; Affects Carry
  8397.        ?C>A    A       8B2yy   Requires GOYES or RTNYES; Affects Carry
  8398.        ?C>A    fs      9b2yy   Requires GOYES or RTNYES; Affects Carry
  8399.        ?C>B    A       8B5yy   Requires GOYES or RTNYES; Affects Carry
  8400.        ?C>B    fs      9b5yy   Requires GOYES or RTNYES; Affects Carry
  8401.        ?C>D    A       8B7yy   Requires GOYES or RTNYES; Affects Carry
  8402.        ?C>D    fs      9b7yy   Requires GOYES or RTNYES; Affects Carry
  8403.        ?CBIT=0 d       808Anyy ** Requires GOYES or RTNYES; Affects Carry
  8404.        ?CBIT=1 d       808Bnyy ** Requires GOYES or RTNYES; Affects Carry
  8405.        ?D#0    A       8AFyy   Requires GOYES or RTNYES; Affects Carry
  8406.        ?D#0    fs      9aFyy   Requires GOYES or RTNYES; Affects Carry
  8407.        ?D#C    A       8A7yy   Requires GOYES or RTNYES; Affects Carry
  8408.        ?D#C    fs      9a7yy   Requires GOYES or RTNYES; Affects Carry
  8409.        ?D<=C   A       8BFyy   Requires GOYES or RTNYES; Affects Carry
  8410.        ?D<=C   fs      9bFyy   Requires GOYES or RTNYES; Affects Carry
  8411.        ?D<C    A       8B7yy   Requires GOYES or RTNYES; Affects Carry
  8412.        ?D<C    fs      9b7yy   Requires GOYES or RTNYES; Affects Carry
  8413.        ?D=0    A       8AByy   Requires GOYES or RTNYES; Affects Carry
  8414.        ?D=0    fs      9aByy   Requires GOYES or RTNYES; Affects Carry
  8415.        ?D=C    A       8A3yy   Requires GOYES or RTNYES; Affects Carry
  8416.        ?D=C    fs      9a3yy   Requires GOYES or RTNYES; Affects Carry
  8417.        ?D>=C   A       8BByy   Requires GOYES or RTNYES; Affects Carry
  8418.        ?D>=C   fs      9bByy   Requires GOYES or RTNYES; Affects Carry
  8419.        ?D>C    A       8B3yy   Requires GOYES or RTNYES; Affects Carry
  8420.        ?D>C    fs      9b3yy   Requires GOYES or RTNYES; Affects Carry
  8421.        ?HS=0   d       83nyy   Requires GOYES or RTNYES; Affects Carry
  8422.        ?MP=0           838yy   Requires GOYES or RTNYES; Affects Carry
  8423.        ?P#     d       88nyy   Requires GOYES or RTNYES; Affects Carry
  8424.        ?P=     d       89nyy   Requires GOYES or RTNYES; Affects Carry
  8425.        ?SB=0           832yy   Requires GOYES or RTNYES; Affects Carry
  8426.        ?SR=0           834yy   Requires GOYES or RTNYES; Affects Carry
  8427.        ?ST=0   d       86nyy   Requires GOYES or RTNYES; Affects Carry
  8428.        ?ST=1   d       87nyy   Requires GOYES or RTNYES; Affects Carry
  8429.        ?XM=0           831yy   Requires GOYES or RTNYES; Affects Carry
  8430.        A=-A    A       F8      Affects Carry
  8431.        A=-A    fs      Bb8     Affects Carry
  8432.        A=-A-1  A       FC      Clears Carry
  8433.        A=-A-1  fs      BbC     Clears Carry
  8434.        A=0     A       D0
  8435.        A=0     fs      Ab0
  8436.        A=A!B   fs      0Ef8
  8437.        A=A!C   fs      0EfE
  8438.        A=A&B   fs      0Ef0
  8439.        A=A&C   fs      0Ef6
  8440.        A=A+1   A       E4      Affects Carry
  8441.  
  8442.  
  8443.  
  8444.                                  Page 128
  8445.  
  8446.  
  8447.  
  8448.  
  8449.        A=A+1   fs      Ba4     Affects Carry
  8450.        A=A+A   A       C4      Affects Carry
  8451.        A=A+A   fs      Aa4     Affects Carry
  8452.        A=A+B   A       C0      Affects Carry
  8453.        A=A+B   fs      Aa0     Affects Carry
  8454.        A=A+C   A       CA      Affects Carry
  8455.        A=A+C   fs      AaA     Affects Carry
  8456.        A=A+CON rfs,d   818f0m  ** Affects Carry
  8457.        A=A-1   A       CC      Affects Carry
  8458.        A=A-1   fs      AaC     Affects Carry
  8459.        A=A-B   A       E0      Affects Carry
  8460.        A=A-B   fs      Ba0     Affects Carry
  8461.        A=A-C   A       EA      Affects Carry
  8462.        A=A-C   fs      BaA     Affects Carry
  8463.        A=A-CON rfs,d   818f8m  ** Affects Carry
  8464.        A=B     A       D4
  8465.        A=B     fs      Ab4
  8466.        A=B!A   fs      0Ef8
  8467.        A=B&A   fs      0Ef0
  8468.        A=B+A   A       C0      Affects Carry
  8469.        A=B+A   fs      Aa0     Affects Carry
  8470.        A=B-A   A       EC      Affects Carry
  8471.        A=B-A   fs      BaC     Affects Carry
  8472.        A=C     A       DA
  8473.        A=C     fs      AbA
  8474.        A=C!A   fs      0EfE
  8475.        A=C&A   fs      0Ef6
  8476.        A=C+A   A       CA      Affects Carry
  8477.        A=C+A   fs      AaA     Affects Carry
  8478.        A=DAT0  A       142
  8479.        A=DAT0  B       14A
  8480.        A=DAT0  fs      152a
  8481.        A=DAT0  d       15Am
  8482.        A=DAT1  A       143
  8483.        A=DAT1  B       14B
  8484.        A=DAT1  fs      153a
  8485.        A=DAT1  d       15Bm
  8486.        A=IN            802
  8487.        A=PC            81B4    **
  8488.        A=R0            110
  8489.        A=R0.F  W       110     **
  8490.        A=R0.F  fs      81Af10  **
  8491.        A=R1            111
  8492.        A=R1.F  W       111     **
  8493.        A=R1.F  fs      81Af11  **
  8494.        A=R2            112
  8495.        A=R2.F  W       112     **
  8496.        A=R2.F  fs      81Af12  **
  8497.        A=R3            113
  8498.        A=R3.F  W       113     **
  8499.        A=R3.F  fs      81Af13  **
  8500.        A=R4            114
  8501.        A=R4.F  W       114     **
  8502.        A=R4.F  fs      81Af14  **
  8503.        ABEX    A       DC
  8504.        ABEX    fs      AbC
  8505.        ABIT=0  d       8084n   ** Clears bit d of A register
  8506.        ABIT=1  d       8085n   ** Sets bit d of A register
  8507.  
  8508.  
  8509.  
  8510.                                  Page 129
  8511.  
  8512.  
  8513.  
  8514.  
  8515.        ACEX    A       DE
  8516.        ACEX    fs      AbE
  8517.        AD0EX           132
  8518.        AD0XS           13A
  8519.        AD1EX           133
  8520.        AD1XS           13B
  8521.        APCEX           81B6    ** Continues elsewhere
  8522.        AR0EX           120
  8523.        AR0EX.F fs      81Af20  **
  8524.        AR1EX           121
  8525.        AR1EX.F fs      81Af21  **
  8526.        AR2EX           122
  8527.        AR2EX.F fs      81Af22  **
  8528.        AR3EX           123
  8529.        AR3EX.F fs      81Af23  **
  8530.        AR4EX           124
  8531.        AR4EX.F fs      81Af24  **
  8532.        ASL     A       F0
  8533.        ASL     fs      Bb0
  8534.        ASLC            810
  8535.        ASR     A       F4
  8536.        ASR     fs      Bb4
  8537.        ASRB            81C
  8538.        ASRB.F  fs      819f0   **
  8539.        ASRC            814
  8540.        B=-B    A       F9      Affects Carry
  8541.        B=-B    fs      Bb9     Affects Carry
  8542.        B=-B-1  A       FD      Clears Carry
  8543.        B=-B-1  fs      BbD     Clears Carry
  8544.        B=0     A       D1
  8545.        B=0     fs      Ab1
  8546.        B=A     A       D8
  8547.        B=A     fs      Ab8
  8548.        B=A!B   fs      0EfC
  8549.        B=A&B   fs      0Ef4
  8550.        B=A+B   A       C8      Affects Carry
  8551.        B=A+B   fs      Aa8     Affects Carry
  8552.        B=B!A   fs      0EfC
  8553.        B=B!C   fs      0Ef9
  8554.        B=B&A   fs      0Ef4
  8555.        B=B&C   fs      0Ef1
  8556.        B=B+1   A       E5      Affects Carry
  8557.        B=B+1   fs      Ba5     Affects Carry
  8558.        B=B+A   A       C8      Affects Carry
  8559.        B=B+A   fs      Aa8     Affects Carry
  8560.        B=B+B   A       C5      Affects Carry
  8561.        B=B+B   fs      Aa5     Affects Carry
  8562.        B=B+C   A       C1      Affects Carry
  8563.        B=B+C   fs      Aa1     Affects Carry
  8564.        B=B+CON rfs,d   818f1m  ** Affects Carry
  8565.        B=B-1   A       CD      Affects Carry
  8566.        B=B-1   fs      AaD     Affects Carry
  8567.        B=B-A   A       E8      Affects Carry
  8568.        B=B-A   fs      Ba8     Affects Carry
  8569.        B=B-C   A       E1      Affects Carry
  8570.        B=B-C   fs      Ba1     Affects Carry
  8571.        B=B-CON rfs,d   818f9m  ** Affects Carry
  8572.        B=C     A       D5
  8573.  
  8574.  
  8575.  
  8576.                                  Page 130
  8577.  
  8578.  
  8579.  
  8580.  
  8581.        B=C     fs      Ab5
  8582.        B=C!B   fs      0Ef9
  8583.        B=C&B   fs      0Ef1
  8584.        B=C+B   A       C1      Affects Carry
  8585.        B=C+B   fs      Aa1     Affects Carry
  8586.        B=C-B   A       ED      Affects Carry
  8587.        B=C-B   fs      BaD     Affects Carry
  8588.        BAEX    A       DC
  8589.        BAEX    fs      AbC
  8590.        BCEX    A       DD
  8591.        BCEX    fs      AbD
  8592.        BSL     A       F1
  8593.        BSL     fs      Bb1
  8594.        BSLC            811
  8595.        BSR     A       F5
  8596.        BSR     fs      Bb5
  8597.        BSRB            81D
  8598.        BSRB.F  W       81D     **
  8599.        BSRB.F  fs      819f1   **
  8600.        BSRC            815
  8601.        BUSCB           8083    **
  8602.        BUSCC           80B
  8603.        BUSCD           808D    **
  8604.        C+P+1           809     Affects Carry
  8605.        C=-C    A       FA      Affects Carry
  8606.        C=-C    fs      BbA     Affects Carry
  8607.        C=-C-1  A       FE      Clears Carry
  8608.        C=-C-1  fs      BbE     Clears Carry
  8609.        C=0     A       D2
  8610.        C=0     fs      Ab2
  8611.        C=A     A       D6
  8612.        C=A     fs      Ab6
  8613.        C=A!C   fs      0EfA
  8614.        C=A&C   fs      0Ef2
  8615.        C=A+C   A       C2      Affects Carry
  8616.        C=A+C   fs      Aa2     Affects Carry
  8617.        C=A-C   A       EE      Affects Carry
  8618.        C=A-C   fs      BaE     Affects Carry
  8619.        C=B     A       D9
  8620.        C=B     fs      Ab9
  8621.        C=B!C   fs      0EfD
  8622.        C=B&C   fs      0Ef5
  8623.        C=B+C   A       C9      Affects Carry
  8624.        C=B+C   fs      Aa9     Affects Carry
  8625.        C=C!A   fs      0EfA
  8626.        C=C!B   fs      0EfD
  8627.        C=C!D   fs      0EfF
  8628.        C=C&A   fs      0Ef2
  8629.        C=C&B   fs      0Ef5
  8630.        C=C&D   fs      0Ef7
  8631.        C=C+1   A       E6      Affects Carry
  8632.        C=C+1   fs      Ba6     Affects Carry
  8633.        C=C+A   A       C2      Affects Carry
  8634.        C=C+A   fs      Aa2     Affects Carry
  8635.        C=C+B   A       C9      Affects Carry
  8636.        C=C+B   fs      Aa9     Affects Carry
  8637.        C=C+C   A       C6      Affects Carry
  8638.        C=C+C   fs      Aa6     Affects Carry
  8639.  
  8640.  
  8641.  
  8642.                                  Page 131
  8643.  
  8644.  
  8645.  
  8646.  
  8647.        C=C+CON rfs,d   818f2m  ** Affects Carry
  8648.        C=C+D   A       CB      Affects Carry
  8649.        C=C+D   fs      AaB     Affects Carry
  8650.        C=C+P+1         809     Affects Carry
  8651.        C=C-1   A       CE      Affects Carry
  8652.        C=C-1   fs      AaE     Affects Carry
  8653.        C=C-A   A       E2      Affects Carry
  8654.        C=C-A   fs      Ba2     Affects Carry
  8655.        C=C-B   A       E9      Affects Carry
  8656.        C=C-B   fs      Ba9     Affects Carry
  8657.        C=C-CON rfs,d   818fAm  ** Affects Carry
  8658.        C=C-D   A       EB      Affects Carry
  8659.        C=C-D   fs      BaB     Affects Carry
  8660.        C=D     A       DB
  8661.        C=D     fs      AbB
  8662.        C=D!C   fs      0EfF
  8663.        C=D&C   fs      0Ef7
  8664.        C=D+C   A       CB      Affects Carry
  8665.        C=D+C   fs      AaB     Affects Carry
  8666.        C=DAT0  A       146
  8667.        C=DAT0  B       14E
  8668.        C=DAT0  fs      156a
  8669.        C=DAT0  d       15Em
  8670.        C=DAT1  A       147
  8671.        C=DAT1  B       14F
  8672.        C=DAT1  fs      157a
  8673.        C=DAT1  d       15Fm
  8674.        C=ID            806
  8675.        C=IN            803
  8676.        C=P     d       80Cn
  8677.        C=PC            81B5    **
  8678.        C=R0            118
  8679.        C=R0.F  fs      81Af18  **
  8680.        C=R1            119
  8681.        C=R1.F  fs      81Af19  **
  8682.        C=R2            11A
  8683.        C=R2.F  fs      81Af1A  **
  8684.        C=R3            11B
  8685.        C=R3.F  fs      81Af1B  **
  8686.        C=R4            11C
  8687.        C=R4.F  fs      81Af1C  **
  8688.        C=RSTK          07
  8689.        C=ST            09
  8690.        CAEX    A       DE
  8691.        CAEX    fs      AbE
  8692.        CBEX    A       DD
  8693.        CBEX    fs      AbD
  8694.        CBIT=0  d       8088n   ** Clears bit d of C register
  8695.        CBIT=1  d       8089n   ** Sets bit d of C register
  8696.        CD0EX           136
  8697.        CD0XS           13E
  8698.        CD1EX           137
  8699.        CD1XS           13F
  8700.        CDEX    A       DF
  8701.        CDEX    fs      AbF
  8702.        CLRHST          82F
  8703.        CLRST           08
  8704.        CON(1)  expr    n
  8705.  
  8706.  
  8707.  
  8708.                                  Page 132
  8709.  
  8710.  
  8711.  
  8712.  
  8713.        CON(2)  expr    nn
  8714.        CON(3)  expr    nnn
  8715.        CON(4)  expr    nnnn
  8716.        CON(5)  expr    nnnnn
  8717.        CON(6)  expr    nnnnnn
  8718.        CON(7)  expr    nnnnnnn
  8719.        CON(8)  expr    nnnnnnnn
  8720.        CONFIG          805
  8721.        CPCEX           81B7    ** Continues elsewhere
  8722.        CPEX    d       80Fn
  8723.        CR0EX           128
  8724.        CR0EX.F fs      81Af28  **
  8725.        CR1EX           129
  8726.        CR1EX.F fs      81Af29  **
  8727.        CR2EX           12A
  8728.        CR2EX.F fs      81Af2A  **
  8729.        CR3EX           12B
  8730.        CR3EX.F fs      81Af2B  **
  8731.        CR4EX           12C
  8732.        CR4EX.F fs      81Af2C  **
  8733.        CSL     A       F2
  8734.        CSL     fs      Bb2
  8735.        CSLC            812
  8736.        CSR     A       F6
  8737.        CSR     fs      Bb6
  8738.        CSRB            81E
  8739.        CSRB.F  fs      819f2   **
  8740.        CSRC            816
  8741.        CSTEX           0B
  8742.        D0=(2)  expr    19nn
  8743.        D0=(4)  expr    1Annnn
  8744.        D0=(5)  expr    1Bnnnnn
  8745.        D0=A            130
  8746.        D0=AS           138
  8747.        D0=C            134
  8748.        D0=CS           13C
  8749.        D0=D0+  d       16m     Affects Carry
  8750.        D0=D0-  d       18m     Affects Carry
  8751.        D0=HEX  hh      19hh
  8752.        D0=HEX  hhhh    1Ahhhh
  8753.        D0=HEX  hhhhh   1Bhhhhh
  8754.        D1=(2)  expr    1Dnn
  8755.        D1=(4)  expr    1Ennnn
  8756.        D1=(5)  expr    1Fnnnnn
  8757.        D1=A            131
  8758.        D1=AS           139
  8759.        D1=C            135
  8760.        D1=CS           13D
  8761.        D1=D1+  d       17m     Affects Carry
  8762.        D1=D1-  d       1Cm     Affects Carry
  8763.        D1=HEX  hh      1Dhh
  8764.        D1=HEX  hhhh    1Ehhhh
  8765.        D1=HEX  hhhhh   1Fhhhhh
  8766.        D=-D    A       FB      Affects Carry
  8767.        D=-D    fs      BbB     Affects Carry
  8768.        D=-D-1  A       FF      Clears Carry
  8769.        D=-D-1  fs      BbF     Clears Carry
  8770.        D=0     A       D3
  8771.  
  8772.  
  8773.  
  8774.                                  Page 133
  8775.  
  8776.  
  8777.  
  8778.  
  8779.        D=0     fs      Ab3
  8780.        D=C     A       D7
  8781.        D=C     fs      Ab7
  8782.        D=C!D   fs      0EfB
  8783.        D=C&D   fs      0Ef3
  8784.        D=C+D   A       C3      Affects Carry
  8785.        D=C+D   fs      Aa3     Affects Carry
  8786.        D=C-D   A       EF      Affects Carry
  8787.        D=C-D   fs      BaF     Affects Carry
  8788.        D=D!C   fs      0EfB
  8789.        D=D&C   fs      0Ef3
  8790.        D=D+1   A       E7      Affects Carry
  8791.        D=D+1   fs      Ba7     Affects Carry
  8792.        D=D+C   A       C3      Affects Carry
  8793.        D=D+C   fs      Aa3     Affects Carry
  8794.        D=D+CON rfs,d   818f3m  ** Affects Carry
  8795.        D=D+D   A       C7      Affects Carry
  8796.        D=D+D   fs      Aa7     Affects Carry
  8797.        D=D-1   A       CF      Affects Carry
  8798.        D=D-1   fs      AaF     Affects Carry
  8799.        D=D-C   A       E3      Affects Carry
  8800.        D=D-C   fs      Ba3     Affects Carry
  8801.        D=D-CON rfs,d   818fBm  ** Affects Carry
  8802.        DAT0=A  A       140
  8803.        DAT0=A  B       148
  8804.        DAT0=A  fs      150a
  8805.        DAT0=A  d       158m
  8806.        DAT0=C  A       144
  8807.        DAT0=C  B       14C
  8808.        DAT0=C  fs      154a
  8809.        DAT0=C  d       15Cm
  8810.        DAT1=A  A       141
  8811.        DAT1=A  B       149
  8812.        DAT1=A  fs      151a
  8813.        DAT1=A  d       159m
  8814.        DAT1=C  A       145
  8815.        DAT1=C  B       14D
  8816.        DAT1=C  fs      155a
  8817.        DAT1=C  d       15Dm
  8818.        DCEX    A       DF
  8819.        DCEX    fs      AbF
  8820.        DSL     A       F3
  8821.        DSL     fs      Bb3
  8822.        DSLC            813
  8823.        DSR     A       F7
  8824.        DSR     fs      Bb7
  8825.        DSRB            81F
  8826.        DSRB.F  fs      819f3   **
  8827.        DSRC            817
  8828.        GOC     label   4yy     Continues elsewhere if Carry set
  8829.        GOLONG  label   8Cyyyy  Continues elsewhere
  8830.        GONC    label   5yy     Continues elsewhere if Carry clear
  8831.        GOSBVL  label   8Fyyyyy Affects Carry
  8832.        GOSUB   label   7yyy    Affects Carry
  8833.        GOSUBL  label   8Eyyyy  Affects Carry
  8834.        GOTO    label   6yyy    Continues elsewhere
  8835.        GOVLNG  label   8Dyyyyy Continues elsewhere
  8836.        GOYES   label   tt      Must follow a test instruction
  8837.  
  8838.  
  8839.  
  8840.                                  Page 134
  8841.  
  8842.  
  8843.  
  8844.  
  8845.        HS=0    d       82n     Clears (MP SR SB XM) according to d
  8846.                                Example: 823 Clears SB and XM
  8847.        INTOFF          808F
  8848.        INTON           8080
  8849.        LA(1)   expr    80820n          ** Load A register
  8850.        LA(2)   expr    80821nn         ** Load A register
  8851.        LA(3)   expr    80822nnn        ** Load A register
  8852.        LA(4)   expr    80823nnnn       ** Load A register
  8853.        LA(5)   expr    80824nnnnn      ** Load A register
  8854.        LA(6)   expr    80825nnnnnn     ** Load A register
  8855.        LA(7)   expr    80826nnnnnnn    ** Load A register
  8856.        LA(8)   expr    80827nnnnnnnn   ** Load A register
  8857.        LC(1)   expr    30n             Load C register
  8858.        LC(2)   expr    31nn            Load C register
  8859.        LC(3)   expr    32nnn           Load C register
  8860.        LC(4)   expr    33nnnn          Load C register
  8861.        LC(5)   expr    34nnnnn         Load C register
  8862.        LC(6)   expr    35nnnnnn        Load C register
  8863.        LC(7)   expr    36nnnnnnn       Load C register
  8864.        LC(8)   expr    37nnnnnnnn      Load C register
  8865.        MP=0            828
  8866.        NIBASC  ASCII x...x
  8867.        NIBFS   fs      f
  8868.        NIBHEX  hhhhhhh hhhhhhh Affects Carry
  8869.        NOP3            820
  8870.        NOP4            6300
  8871.        NOP5            64000
  8872.        OUT=C           801
  8873.        OUT=CS          800
  8874.        P=      d       2n
  8875.        P=C     d       80Dn
  8876.        P=P+1           0C      Affects Carry
  8877.        P=P-1           0D      Affects Carry
  8878.        PC=(A)          808C    ** Continues elsewhere
  8879.        PC=(C)          808E    ** Continues elsewhere
  8880.        PC=A            81B2    ** Continues elsewhere
  8881.        PC=C            81B3    ** Continues elsewhere
  8882.        R0=A            100
  8883.        R0=A.F  fs      81Af00  **
  8884.        R0=C            108
  8885.        R0=C.F  fs      81Af08  **
  8886.        R1=A            101
  8887.        R1=A.F  fs      81Af01  **
  8888.        R1=C            109
  8889.        R1=C.F  fs      81Af09  **
  8890.        R2=A            102
  8891.        R2=A.F  fs      81Af02  **
  8892.        R2=C            10A
  8893.        R2=C.F  fs      81Af0A  **
  8894.        R3=A            103
  8895.        R3=A.F  fs      81Af03  **
  8896.        R3=C            10B
  8897.        R3=C.F  fs      81Af0B  **
  8898.        R4=A            104
  8899.        R4=A.F  fs      81Af04  **
  8900.        R4=C            10C
  8901.        R4=C.F  fs      81Af0C  **
  8902.        REL(1)  label   y
  8903.  
  8904.  
  8905.  
  8906.                                  Page 135
  8907.  
  8908.  
  8909.  
  8910.  
  8911.        REL(2)  label   yy
  8912.        REL(3)  label   yyy
  8913.        REL(4)  label   yyyy
  8914.        REL(5)  label   yyyyy
  8915.        REL(6)  label   yyyyyy
  8916.        REL(7)  label   yyyyyyy
  8917.        REL(8)  label   yyyyyyyy
  8918.        RESET           80A
  8919.        RSI             80810   **
  8920.        RSTK=C          06
  8921.        RTI             0F      Continues elsewhere
  8922.        RTN             01      Continues elsewhere
  8923.        RTNC            400     Continues elsewhere if Carry set
  8924.        RTNCC           03      Continues elsewhere clearing Carry
  8925.        RTNNC           500     Continues elsewhere if Carry clear
  8926.        RTNSC           02      Continues elsewhere setting Carry
  8927.        RTNSXM          00      Continues elsewhere setting XM bit
  8928.        RTNYES          **      Must follow a test instruction
  8929.        SB=0            822
  8930.        SETDEC          05
  8931.        SETHEX          04
  8932.        SHUTDN          807
  8933.        SLINK   label   yyyyy
  8934.        SR=0            824
  8935.        SREQ?           80E
  8936.        ST=0    d       84n
  8937.        ST=1    d       85n
  8938.        ST=C            0A
  8939.        STRING  ASCII x...x
  8940.        UNCNFG          804
  8941.        XM=0            821
  8942.  
  8943.  
  8944.  
  8945.  
  8946.  
  8947.  
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.  
  8968.  
  8969.  
  8970.  
  8971.  
  8972.                                  Page 136
  8973.  
  8974.  
  8975.  
  8976.  
  8977.        10.  Error Messages
  8978.  
  8979.        This is a list of all errors which are generated by the
  8980.        assembler and explanations of what causes that error message
  8981.        to be printed.
  8982.  
  8983.        Non-fatal error messages are lines of the form
  8984.        *** ERROR: message *** which are followed by the source line
  8985.        containing the error.  These messages indicate errors in the
  8986.        code, but the assembly continues to subsequent lines.  For a
  8987.        few error messages, the message follows the line containing
  8988.        the error.  Those error messages are noted in the list.
  8989.  
  8990.        Fatal error messages are lines of the form SASM.EXE: message
  8991.        (details).  These messages indicate errors encountered
  8992.        during the assembly process which are not code-related and
  8993.        which terminate the assembly.  The list and object files for
  8994.        the assembly, if any, may not be complete.
  8995.  
  8996.        Command line messages are messages related to options
  8997.        specified on the command line.  The messages indicate
  8998.        problems with options.  If any command line messages have
  8999.        been printed when all options have been processed, the
  9000.        assembly stops.  No files have been altered (except the d
  9001.        option, which takes effect immediately).
  9002.  
  9003.        Some explanations include suggestions to help track down the
  9004.        cause of the error.
  9005.  
  9006.  
  9007.        10.1  Non-Fatal Error Messages
  9008.  
  9009.  
  9010.        ERROR: ABS/REL must be at beginning
  9011.  
  9012.        The ABS and REL statements, if present, must precede all
  9013.        code-generating statements.
  9014.  
  9015.        ERROR: Branch out of range
  9016.  
  9017.        The distance to the target label is too far for the size of
  9018.        this field.
  9019.  
  9020.        ERROR: Can't add two external expressions
  9021.  
  9022.        Both sides of + are external expressions.  At most one
  9023.        external reference is allowed with the + operator.
  9024.  
  9025.  
  9026.  
  9027.  
  9028.  
  9029.  
  9030.  
  9031.  
  9032.  
  9033.  
  9034.  
  9035.  
  9036.  
  9037.  
  9038.                                  Page 137
  9039.  
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.        ERROR: Can't define a new macro within a macro
  9046.  
  9047.        Executed a MACRO statement while expanding a macro.  A new
  9048.        macro cannot be defined while expanding a macro.
  9049.  
  9050.        Suggestion: A missing ENDM at the end of a macro definition
  9051.        might cause this if another macro follows the one currently
  9052.        being expanded.
  9053.  
  9054.        ERROR: Can't have external reference on left side of
  9055.  
  9056.        The left side of   is an external reference.  An external
  9057.        reference is allowed only on the right side of the
  9058.        operator.
  9059.  
  9060.        ERROR: Can't have external reference on right side of -
  9061.  
  9062.        The right side of - is an external reference.  An external
  9063.        reference is allowed only on the left side of the -
  9064.        operator.
  9065.  
  9066.        ERROR: Can't redefine an existing macro
  9067.  
  9068.        A MACRO statement was executed to define a macro which has
  9069.        already been defined.
  9070.  
  9071.        ERROR: Can't redefine an existing opcode
  9072.  
  9073.        A MACRO statement was executed to define a macro, but the
  9074.        macro name is the same as an opcode.
  9075.  
  9076.        ERROR: Can't use !,&,*,/,%, or ^ with external reference
  9077.  
  9078.        At least one of the operands is an external expression.  An
  9079.        external reference is not allowed with these operators.
  9080.  
  9081.        ERROR: Conditional assembly stack overflow
  9082.  
  9083.        IF statements are nested more than 20 levels.  Simplify the
  9084.        logic of the IF tests, or use the SETFLAG and CLRFLAG
  9085.        statements to indicate combinations of IF tests.
  9086.  
  9087.        ERROR: Divide by zero (result set to 0)
  9088.  
  9089.        The expression on the right side of the / operator is zero.
  9090.  
  9091.        ERROR: Duplicate ELSE statement
  9092.  
  9093.        More than one ELSE statement was executed for a given test.
  9094.  
  9095.  
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.                                  Page 138
  9105.  
  9106.  
  9107.  
  9108.  
  9109.        ERROR: Duplicate symbol
  9110.  
  9111.        The symbol being defined on this line has already been
  9112.        defined in this file.
  9113.  
  9114.        Suggestion: Check the cross reference to find the previous
  9115.        definition; line 0 means the symbol was defined on the
  9116.        command line with -D.
  9117.  
  9118.        ERROR: ELSE without matching IF
  9119.  
  9120.        An ELSE statement was executed without a corresponding IF
  9121.        statement.
  9122.  
  9123.        Suggestion: Check for a typing error in the label field of
  9124.        the IF and ELSE statements.
  9125.  
  9126.        ERROR: ENDIF without matching IF
  9127.  
  9128.        An ENDIF statement was executed without a corresponding IF
  9129.        statement.
  9130.  
  9131.        Suggestion: Check for a typing error in the label field of
  9132.        the IF and ENDIF statements.
  9133.  
  9134.        ERROR: ENDM and EXITM not permitted outside of a macro
  9135.  
  9136.        Executed an ENDM or EXITM while not in a macro.
  9137.  
  9138.        Suggestion: Check for an error in the preceding MACRO
  9139.        statement, if present.
  9140.  
  9141.        ERROR: End of file while defining macro
  9142.  
  9143.        The end of a file containing a macro definition was reached
  9144.        while defining a macro.
  9145.  
  9146.        Suggestion: Check for an error in an ENDM statement or a
  9147.        missing ENDM statement.
  9148.  
  9149.        ERROR: Error reading CHARMAP file (filespec)
  9150.  
  9151.        A file system error occurred while reading the CHARMAP file.
  9152.  
  9153.  
  9154.  
  9155.  
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162.  
  9163.  
  9164.  
  9165.  
  9166.  
  9167.  
  9168.  
  9169.  
  9170.                                  Page 139
  9171.  
  9172.  
  9173.  
  9174.  
  9175.        ERROR: Error reading RDSYMB file (filespec)
  9176.  
  9177.        The RDSYMB file is not a Saturn object file, or a file
  9178.        system error occurred while reading the header of the RDSYMB
  9179.        file.
  9180.  
  9181.        Three things must be true for the file to be considered a
  9182.        valid Saturn object file:
  9183.  
  9184.          1.  There is a 256-byte header in the file.
  9185.  
  9186.          2.  The first six bytes of the header are ``Saturn''.
  9187.  
  9188.          3.  The offset to the start of the symbol records
  9189.              indicated in the header is contained in this file.
  9190.  
  9191.        ERROR: Error reading from RDSYMB file (filespec)
  9192.  
  9193.        The RDSYMB file is not a Saturn object file, or a file
  9194.        system error occurred while reading the RDSYMB file.
  9195.  
  9196.        ERROR: Expanded macro line too long (truncated)
  9197.  
  9198.        The line resulting from macro expansion is more than 255
  9199.        characters long.  Only the first 255 characters are used.
  9200.  
  9201.        ERROR: Exponent less than zero (result set to 0)
  9202.  
  9203.        The expression on the right side of the ^ operator is less
  9204.        than zero.
  9205.  
  9206.        ERROR: Expression can not be external
  9207.  
  9208.        The expression for the EQU or = statement contains an
  9209.        external reference.  Only absolute or relocatable symbols
  9210.        are allowed for these statements.
  9211.  
  9212.        ERROR: Expression must be absolute
  9213.  
  9214.        The expression in the ABS, REL, BSS, or LISTALL statement
  9215.        contains a relocatable or external reference.  Only absolute
  9216.        symbols are allowed for these statements.
  9217.  
  9218.        ERROR: Expression not allowed as target of branch
  9219.  
  9220.        The modifier is not a label reference, and the -x option was
  9221.        not specified on the command line.
  9222.  
  9223.        The label is not a valid label because it contains a right
  9224.        parenthesis ')'
  9225.  
  9226.        Suggestion: If this is a REL(n) statement, an expression can
  9227.        be used without specifying the -x option by subtracting (*)
  9228.        from the expression and using a CON(n) statement.
  9229.  
  9230.  
  9231.  
  9232.  
  9233.  
  9234.  
  9235.  
  9236.                                  Page 140
  9237.  
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.        ERROR: Expression not allowed for INC(x), LINK, and SLINK
  9244.  
  9245.        The modifier is not a label reference.  INC(n), LINK, and
  9246.        SLINK require a label reference.
  9247.  
  9248.        The label is not a valid label because it contains a right
  9249.        parenthesis ')'
  9250.  
  9251.        ERROR: Expression out of range
  9252.  
  9253.        A digit expression is less than zero or greater than 15
  9254.        after applying the statement's adjustment factor (usually 0
  9255.        or -1).
  9256.  
  9257.        ERROR: Expression stack overflow
  9258.  
  9259.        The expression is too complicated.  There can be no more
  9260.        than 20 pending data items.
  9261.  
  9262.        Suggestion: Simplify the expression by splitting it into
  9263.        several smaller expressions.  Assign each of the smaller
  9264.        expressions to a symbol and combine them for the final
  9265.        expression.
  9266.  
  9267.        ERROR: Expression stack underflow
  9268.  
  9269.        An expression was not present when expected.
  9270.  
  9271.        Suggestion: This usually indicates a missing data item
  9272.        following an operator.  This can be caused by a blank or tab
  9273.        within the expression, as they indicate the end of the
  9274.        field.
  9275.  
  9276.        ERROR: Field too long
  9277.  
  9278.        A field is longer than the maximum length allowed.  There
  9279.        should be another message following this one which gives
  9280.        more detailed information about the error.
  9281.  
  9282.        ERROR: Flag value out of range
  9283.  
  9284.        The flag expression in the IF, CLRFLAG, or SETFLAG statement
  9285.        is less than zero or greater than 99.
  9286.  
  9287.        ERROR: GOYES/RTNYES without test instruction
  9288.  
  9289.        A GOYES or RTNYES statement was executed, but the preceding
  9290.        instruction was not a test instruction.
  9291.  
  9292.        ERROR: IF expression must be absolute
  9293.  
  9294.        The flag expression in the IF, CLRFLAG, or SETFLAG statement
  9295.        contains a relocatable or external reference.  Only absolute
  9296.        symbols are allowed for these statements.
  9297.  
  9298.  
  9299.  
  9300.  
  9301.  
  9302.                                  Page 141
  9303.  
  9304.  
  9305.  
  9306.  
  9307.        ERROR: INCLUDE or MACRO nested too deeply
  9308.  
  9309.        The number of nested INCLUDE and MACRO expansions is greater
  9310.        than 20.
  9311.  
  9312.        Suggestion: Check for a macro calling itself, or an include
  9313.        file including itself.
  9314.  
  9315.        ERROR: Illegal field select
  9316.  
  9317.        The field select is not a valid field select indicator (P,
  9318.        WP, XS, X, S, M, B, W, or A).
  9319.  
  9320.        ERROR: Illegal mnemonic
  9321.  
  9322.        The instruction was not found in the opcode table, or a
  9323.        macro was used before it was defined.
  9324.  
  9325.        Suggestion: Check that the processor command-line option (-
  9326.        P) is correct, and that the label, if any, starts in either
  9327.        the first or second column.
  9328.  
  9329.        ERROR: Input line too long (extra characters ignored)
  9330.  
  9331.        An input line is more than 255 characters long.  Only the
  9332.        first 255 characters are used.
  9333.  
  9334.        ERROR: Instruction not allowed with this CPU
  9335.  
  9336.        A statement was executed which is not permitted by the
  9337.        current value of the -P command-line option.  This message
  9338.        indicates a probable assembler defect, and should be
  9339.        reported as such.
  9340.  
  9341.        ERROR: Invalid ASC constant
  9342.  
  9343.        An ASCII constant in an expression is improperly formed.
  9344.        The terminating character must match the beginning character
  9345.        (\, ', or ").
  9346.  
  9347.        This message also indicates an ASCII constant containing
  9348.        more than 40 characters.
  9349.  
  9350.        ERROR: Invalid ASC constant (too large)
  9351.  
  9352.        More than 8 characters were specified for LAASC or LCASC, or
  9353.        more than 4 characters were specified in an ASCII constant
  9354.        in an expression.
  9355.  
  9356.        ERROR: Invalid HEX constant
  9357.  
  9358.        A character which is not a hexadecimal digit was specified
  9359.        for LAHEX, LCHEX, D0=HEX, D1=HEX, or NIBHEX, or than 40
  9360.        hexadecimal digits were specified for NIBHEX.
  9361.  
  9362.  
  9363.  
  9364.  
  9365.  
  9366.  
  9367.  
  9368.                                  Page 142
  9369.  
  9370.  
  9371.  
  9372.  
  9373.        ERROR: Invalid HEX constant (not 2, 4, or 5 digits)
  9374.  
  9375.        The hexadecimal constant for D0=HEX and D1=HEX must consist
  9376.        of two, four, or five digits.
  9377.  
  9378.        ERROR: Invalid HEX constant (not HEX digit)
  9379.  
  9380.        A character which is not a hexadecimal digit follows a # in
  9381.        an expression.
  9382.  
  9383.        ERROR: Invalid HEX constant (too large)
  9384.  
  9385.        More than 16 hexadecimal digits were specified for LAHEX or
  9386.        LCHEX.
  9387.  
  9388.        ERROR: Invalid HEX constant (too many digits)
  9389.  
  9390.        More than eight hexadecimal digits follow a # in an
  9391.        expression.
  9392.  
  9393.        ERROR: Invalid expression
  9394.  
  9395.        The expression is not a valid expression or an expression is
  9396.        not present.  There may be another message following this
  9397.        one which gives more detailed information about the error.
  9398.  
  9399.        Suggestion: Any field which starts after column 30 is
  9400.        considered to be a comment unless overridden with the -c
  9401.        option.
  9402.  
  9403.        ERROR: Invalid field select/digit
  9404.  
  9405.        The modifier is neither an expression nor a valid field
  9406.        select indicator (P, WP, XS, X, S, M, B, W, or A).
  9407.  
  9408.        Suggestion: This message occurs whenever the expression is
  9409.        not valid.  There may be another message printed which gives
  9410.        more detailed information about the error.
  9411.  
  9412.        ERROR: Invalid file specifier
  9413.  
  9414.        The file specifier for RDSYMB, CHARMAP, or INCLUDE does not
  9415.        include a terminator character, or the file specifier is not
  9416.        present.
  9417.  
  9418.        Suggestion: Any field which starts after column 30 is
  9419.        considered to be a comment unless overridden with the -c
  9420.        option.
  9421.  
  9422.        ERROR: Invalid flag expression
  9423.  
  9424.        The flag expression is not a valid expression or it is not
  9425.        present.  There may be another message following this one
  9426.        which gives more detailed information about the error.
  9427.  
  9428.        Suggestion: Any field which starts after column 30 is
  9429.        considered to be a comment unless overridden with the -c
  9430.        option.
  9431.  
  9432.  
  9433.  
  9434.                                  Page 143
  9435.  
  9436.  
  9437.  
  9438.  
  9439.        ERROR: Invalid format character
  9440.  
  9441.        The indirect macro parameter reference ``$(...)'' contains
  9442.        an invalid character.  The characters within the parentheses
  9443.        must be a digit, colon, or one of the characters
  9444.        ``HhXxDdOoUu''.
  9445.  
  9446.        ERROR: Invalid parameter indirection
  9447.  
  9448.        The indirect macro parameter reference ``$('' was found, but
  9449.        the closing right parenthesis is missing.
  9450.  
  9451.        ERROR: Invalid symbol
  9452.  
  9453.        No symbol name was specified with the = or EQU statement, or
  9454.        an equals sign (=) in columns one or two is followed by a
  9455.        blank or tab.
  9456.  
  9457.        ERROR: Invalid symbol name
  9458.  
  9459.        No symbol was specified for IFDEF, IFNDEF, IFOPC, or IFNOPC.
  9460.  
  9461.        Suggestion: Any field which starts after column 30 is
  9462.        considered to be a comment unless overridden with the -c
  9463.        option.
  9464.  
  9465.        ERROR: Label not allowed on GOYES/RTNYES statement
  9466.  
  9467.        A line containing a GOYES or RTNYES statement has a label.
  9468.        This is not allowed because GOYES and RTNYES are the second
  9469.        part of a test operation.
  9470.  
  9471.        ERROR: List type not CODE,MACRO,INCLUDE,PSEUDO,ALL, or
  9472.        NOLIST
  9473.  
  9474.        The modifier(s) for CLRLIST and SETLIST must start with
  9475.        letters C, M, I, P, or A for Code, Macro, Include, Pseudo,
  9476.        or All, respectively.
  9477.  
  9478.        ERROR: Missing expression
  9479.  
  9480.        An expression is required, but no expression was found.
  9481.  
  9482.        Suggestion: Check that the expression starts before the
  9483.        comment column, which defaults to 30 (use the c option to
  9484.        change the column).
  9485.  
  9486.        ERROR: Missing separator character
  9487.  
  9488.        The string separator character for an IFSTR?? test was not
  9489.        found.
  9490.  
  9491.        Suggestion: The first non-blank character after the IFSTR??
  9492.        statement is used as the separator character to delineate
  9493.        the two strings.  The character must appear a total of three
  9494.        times (start of first string, separator between strings, end
  9495.        of second string).
  9496.  
  9497.  
  9498.  
  9499.  
  9500.                                  Page 144
  9501.  
  9502.  
  9503.  
  9504.  
  9505.        ERROR: Modulo zero (result set to 0)
  9506.  
  9507.        The expression on the right side of the % operator is equal
  9508.        to zero.
  9509.  
  9510.        ERROR: More data than operators in expression
  9511.  
  9512.        The expression is incomplete.  This message can occur as the
  9513.        result of an incorrect operator (another error message
  9514.        should be printed).
  9515.  
  9516.        Suggestion: Check for blanks within the expression, or a
  9517.        symbol which is not contained within parentheses.
  9518.  
  9519.        ERROR: Name on ENDM doesn't match MACRO name
  9520.  
  9521.        The label on the ENDM statement is not the same as the label
  9522.        on the most recent MACRO statement.
  9523.  
  9524.        Suggestion: A missing ENDM statement can cause this message
  9525.        if there is another macro defined after the missing ENDM.
  9526.  
  9527.        ERROR: Number of nibbles must be non-negative
  9528.  
  9529.        The number of nibbles expression in BSS is less than zero.
  9530.  
  9531.        ERROR: Number of nibbles too big for file
  9532.  
  9533.        The number of nibbles requested by BSS would overflow the
  9534.        address space of the Saturn CPU.
  9535.  
  9536.        ERROR: Only one TITLE statement allowed per file
  9537.  
  9538.        A TITLE statement was executed, but the title given does not
  9539.        match the current title.
  9540.  
  9541.        Suggestion: Check included files for TITLE statements.
  9542.  
  9543.        ERROR: Operator left on stack
  9544.  
  9545.        There is not enough data for the number of operators given.
  9546.        This message indicates a probable assembler defect, and
  9547.        should be reported as such.
  9548.  
  9549.        ERROR: Operator stack overflow
  9550.  
  9551.        The expression is too complicated.  There can be no more
  9552.        than 20 pending operators, including right parentheses.
  9553.  
  9554.        Suggestion: Simplify the expression by splitting it into
  9555.        several smaller expressions.  Assign each of the smaller
  9556.        expressions to a symbol and combine them for the final
  9557.        expression.
  9558.  
  9559.        ERROR: Operator stack underflow
  9560.  
  9561.        This message indicates a probable assembler defect, and
  9562.        should be reported as such.
  9563.  
  9564.  
  9565.  
  9566.                                  Page 145
  9567.  
  9568.  
  9569.  
  9570.  
  9571.        ERROR: PC changed (use old value)
  9572.  
  9573.        The value of the label on the ABS or REL statement changed.
  9574.  
  9575.        Suggestion: Look in the cross reference for another
  9576.        reference to the label which changes its value.
  9577.  
  9578.        ERROR: PC wrapped around to 00000
  9579.  
  9580.        The number of nibbles in the file exceeds the address space
  9581.        of the Saturn CPU.  The current PC is decremented by
  9582.        #100000.
  9583.  
  9584.        ERROR: Parameter too big (truncated)
  9585.  
  9586.        The size of an indirect macro parameter reference field
  9587.        would cause the line resulting from macro expansion to be
  9588.        more than 255 characters long.  The reference size is
  9589.        reduced so it fits.
  9590.  
  9591.        ERROR: Relocatable offset not allowed here
  9592.  
  9593.        A digit expression is relocatable.  The digit expression
  9594.        must either be absolute or external.
  9595.  
  9596.        ERROR: Single nibble field not allowed here
  9597.  
  9598.        A field select which could evaluate to a single-nibble field
  9599.        (P, XS, S, or WP) was requested for r=r+CON or r=r-CON.
  9600.  
  9601.        Suggestion: This restriction is due to a limitation in the
  9602.        1LR2 processor which causes these instructions to fail for
  9603.        single-nibble fields.
  9604.  
  9605.        ERROR: Symbol changed (use old value)
  9606.  
  9607.        The current value of a symbol is different than the value in
  9608.        pass 2.
  9609.  
  9610.        Suggestion: Check for conditional assembly which uses the
  9611.        IFPASS1 or IFPASS2 statements incorrectly.  This can also be
  9612.        caused by an error in code generated before this line.
  9613.  
  9614.        ERROR: Symbol was not defined in pass 1
  9615.  
  9616.        A symbol which is defined in pass 2 was not defined in pass
  9617.        1.
  9618.  
  9619.        Suggestion: Check for conditional assembly which uses the
  9620.        IFPASS1 or IFPASS2 statements incorrectly.
  9621.  
  9622.        ERROR: Test instruction without GOYES/RTNYES
  9623.  
  9624.        The previous line was a test instruction, but this line is
  9625.        neither GOYES or RTNYES.
  9626.  
  9627.  
  9628.  
  9629.  
  9630.  
  9631.  
  9632.                                  Page 146
  9633.  
  9634.  
  9635.  
  9636.  
  9637.        ERROR: Too many relocatable/external references
  9638.  
  9639.        More than one external or relocatable reference is present.
  9640.        At most one external or net relocatable reference is
  9641.        allowed.
  9642.  
  9643.        ERROR: Unable to open CHARMAP file (filespec)
  9644.  
  9645.        An error occurred opening the file indicated by the file
  9646.        specifier provided.
  9647.  
  9648.        Suggestion: Check that the file specifier is correct and the
  9649.        file is readable.  Also check the value of the SASM_CHARMAP
  9650.        environment variable.
  9651.  
  9652.        ERROR: Unable to open INCLUDE file (filespec)
  9653.  
  9654.        An error occurred opening the file indicated by the file
  9655.        specifier provided.  This message follows the line
  9656.        containing the error.
  9657.  
  9658.        Suggestion: Check that the file specifier is correct and the
  9659.        file is readable.  Also check the value of the SASM_INCLUDE
  9660.        environment variable.
  9661.  
  9662.        ERROR: Unable to open RDSYMB file (filespec)
  9663.  
  9664.        An error occurred opening the file indicated by the file
  9665.        specifier provided.
  9666.  
  9667.        Suggestion: Check that the file specifier is correct and the
  9668.        file is readable.  Also check the value of the SASM_RDSYMB
  9669.        environment variable.
  9670.  
  9671.        ERROR: Undefined symbol
  9672.  
  9673.        The symbol used is not defined within this file and the
  9674.        symbol is not an external symbol reference.
  9675.  
  9676.        ERROR: Unknown PSEUDO-OP
  9677.  
  9678.        The internal code for this instruction is not a code which
  9679.        is known to the assembler.
  9680.  
  9681.        Suggestion: If the opcode file (sasm.opc) has been modified
  9682.        more recently than the assembler, it may contain new codes
  9683.        which are not recognized in the older assembler.
  9684.  
  9685.        ERROR: Unlabeled MACRO statement (*MACRO used)
  9686.  
  9687.        The MACRO statement does not have a label.  The default name
  9688.        *MACRO is used to avoid attempting to assemble the macro
  9689.        instructions without macro expansion.
  9690.  
  9691.        ERROR: Unmatched '(' in expression
  9692.  
  9693.        More right parentheses (() than left parentheses ())
  9694.        occurred in an expression.
  9695.  
  9696.  
  9697.  
  9698.                                  Page 147
  9699.  
  9700.  
  9701.  
  9702.  
  9703.        ERROR: Unmatched ')' in expression
  9704.  
  9705.        More left parentheses ()) than right parentheses (()
  9706.        occurred in an expression.
  9707.  
  9708.        ERROR: Unrecognized operator
  9709.  
  9710.        A character which is not a valid operator character was
  9711.        found when an operator character was expected.
  9712.  
  9713.        Suggestion: This error message may be caused by other errors
  9714.        in the expression.  The character is ignored as if it wasn't
  9715.        there, which may cause other error messages.
  9716.  
  9717.        ERROR: Value too big
  9718.  
  9719.        The value of the expression for ABS or REL is larger than
  9720.        the maximum address for the Saturn CPU.
  9721.  
  9722.  
  9723.        10.2  Fatal Error Messages
  9724.  
  9725.  
  9726.        The name preceding the colon in these messages is the
  9727.        current assembler name.
  9728.  
  9729.        SASM.EXE: filename is not an opcode table file
  9730.  
  9731.        The specified filename does not have the correct format for
  9732.        an opcode table file.
  9733.  
  9734.        SASM.EXE: can't back up objfile
  9735.  
  9736.        The assembler attempted to write a nibble at a location in
  9737.        the file which has already been used.  This message
  9738.        indicates a probable assembler defect, and should be
  9739.        reported as such.
  9740.  
  9741.        SASM.EXE: corrupt opcode table entry (mnemonic not in table)
  9742.  
  9743.        The opcode table file contains an indirect reference to
  9744.        mnemonic, but mnemonic is not in the opcode table.  This
  9745.        message indicates a defect in the opcode table.
  9746.  
  9747.        Suggestion: If mnemonic is not a level 0 instruction, the
  9748.        mnemonic which makes the indirect reference should have the
  9749.        same level as mnemonic.
  9750.  
  9751.        SASM.EXE: error creating a temporary file
  9752.  
  9753.        Creation of a temporary file failed.  Temporary files are
  9754.        used for input from standard input and for macros.
  9755.  
  9756.  
  9757.  
  9758.  
  9759.  
  9760.  
  9761.  
  9762.  
  9763.  
  9764.                                  Page 148
  9765.  
  9766.  
  9767.  
  9768.  
  9769.  
  9770.  
  9771.        SASM.EXE: error creating file description for writing
  9772.  
  9773.        Creation of the specified file failed.
  9774.  
  9775.        Suggestion: Verify that the directory for the file is
  9776.        writable, and if the file already exists, check that it is
  9777.        writable.
  9778.  
  9779.        SASM.EXE: error getting memory for reason
  9780.  
  9781.        A request for memory was rejected by the operating system.
  9782.  
  9783.        Suggestion: Remove RAM-resident utilities to free up memory.
  9784.  
  9785.        SASM.EXE: error opening filename for access
  9786.  
  9787.        The specified filename could not be opened for access.
  9788.  
  9789.        Suggestion: For writing, if the file already exists, check
  9790.        that it is writable.
  9791.  
  9792.        SASM.EXE: error reading from file description
  9793.  
  9794.        A read from the file failed.  The file may be corrupt, or a
  9795.        system error may have occurred.
  9796.  
  9797.        SASM.EXE: error reading location from macro file
  9798.  
  9799.        An attempt to read the current location failed.  The file
  9800.        may be corrupt, or a system error may have occurred.
  9801.  
  9802.        SASM.EXE: error setting location in file description
  9803.  
  9804.        An attempt to set the current location failed.  The file may
  9805.        be corrupt, or a system error may have occurred.
  9806.  
  9807.        SASM.EXE: error writing to file description
  9808.  
  9809.        An attempt to write to the specified file failed.
  9810.  
  9811.        Suggestion: Check for a full disc, a write-protected file,
  9812.        or other operating system limitations.
  9813.  
  9814.        SASM.EXE: macro macro_name was not defined in pass 1
  9815.  
  9816.        A macro definition was encountered in pass 2 which was not
  9817.        found in pass 1.
  9818.  
  9819.        Suggestion: Check for incorrect usage of the IFPASS1 or
  9820.        IFPASS2 statements.
  9821.  
  9822.        SASM.EXE: object file cannot be [stdout]
  9823.  
  9824.        The object file name is ``-'', but neither the h nor the H
  9825.        option was specified on the command line.
  9826.  
  9827.  
  9828.  
  9829.  
  9830.                                  Page 149
  9831.  
  9832.  
  9833.  
  9834.  
  9835.        SASM.EXE: operand type (value) is not valid
  9836.  
  9837.        An invalid operand type was encountered.
  9838.  
  9839.        Suggestion: Check that the opcode table file is not
  9840.        corrupted, and that the version of the assembler matches
  9841.        that of the opcode table file.
  9842.  
  9843.        SASM.EXE: too many nibbles in output file filename
  9844.  
  9845.        The output file already contained 1048576 nibbles when an
  9846.        attempt was made to add another nibble.
  9847.  
  9848.        Suggestion: Check for erroneous BSS statements.
  9849.  
  9850.        SASM.EXE: unable to read current time
  9851.  
  9852.        A request to the operating system for the current time
  9853.        failed.
  9854.  
  9855.  
  9856.        10.3  Command Line Messages
  9857.  
  9858.        Code field width must be greater than 0 (nn invalid)
  9859.  
  9860.             The n option has a width less than or equal to zero.
  9861.  
  9862.        Code field width must be less than nn (nn invalid)
  9863.  
  9864.             The n option has a width greater than the maximum
  9865.             allowed.  The exact value of the maximum depends on the
  9866.             line width field, which defaults to four, and is set to
  9867.             five with the s option.
  9868.  
  9869.        Comment column must be non-negative (nn)
  9870.  
  9871.             The c option has a negative value.  The value must be
  9872.             greater than or equal to zero.  A value of zero means
  9873.             there is no comment column.
  9874.  
  9875.        Flag number out of range (nn)
  9876.  
  9877.             The f option argument contains a flag number which is
  9878.             not between zero and 99, inclusive.
  9879.  
  9880.        Invalid code generation level (string)
  9881.  
  9882.             The P option argument is not between zero and three,
  9883.             inclusive.
  9884.  
  9885.        Invalid flag digit (char)
  9886.  
  9887.             The f option argument contains a character which is
  9888.             neither a digit nor a separator character.  Valid
  9889.             separator characters are ',', ' ' (blank), (;), and
  9890.             (:).
  9891.  
  9892.  
  9893.  
  9894.  
  9895.  
  9896.                                  Page 150
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.        List and code files both [stdout] (list disabled)
  9904.  
  9905.             The A option is specified with the o - option.  The A
  9906.             option is ignored (with the same results as specifying
  9907.             the N option).
  9908.  
  9909.        Non-numeric code field width (string)
  9910.  
  9911.             The n option argument is not a valid integer.
  9912.  
  9913.        Non-numeric comment column (string)
  9914.  
  9915.             The c option argument is not a valid integer.
  9916.  
  9917.        Non-numeric expression for -D (string)
  9918.  
  9919.             For the D option, the expression following the equals
  9920.             sign (=) is not a valid integer.
  9921.  
  9922.             Suggestion: If the symbol to be defined contains an
  9923.             equals sign and the default value is to be used, append
  9924.             another equals sign to the symbol.  This forces the
  9925.             default value to be used.
  9926.  
  9927.        Non-numeric page length (string)
  9928.  
  9929.             The p option argument is not a valid integer.
  9930.  
  9931.        Non-numeric page width (string)
  9932.  
  9933.             The w option argument is not a valid integer.
  9934.  
  9935.        Options -A, -a, and -o not allowed with multiple files
  9936.  
  9937.             Multiple file names are specified in conjunction with
  9938.             the A, a, or o options.  Multiple file names are
  9939.             allowed only when the default list and object file
  9940.             names are used.
  9941.  
  9942.             Suggestion: This error can also be caused by trying to
  9943.             specify options after a file name.  All options must
  9944.             precede the first file name on the command line.
  9945.  
  9946.        Page length must be at least 4 (n)
  9947.  
  9948.             The p option length is less than four.  At least four
  9949.             lines must be printed per page (three for the header,
  9950.             one for program data).
  9951.  
  9952.        Page width must be at least 44 (nn)
  9953.  
  9954.             The w option width is less than 44.  The minimum width
  9955.             is big enough to allow a symbol reference and one line
  9956.             number to fit on the line.
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.                                  Page 151
  9963.  
  9964.  
  9965.  
  9966.  
  9967.        11.  Saturn Object File Format
  9968.  
  9969.        A Saturn object file consists of the following three
  9970.        components:
  9971.  
  9972.           + A 256-byte header
  9973.  
  9974.           + Zero or more 256-byte blocks containing code
  9975.  
  9976.           + Zero or more 256-byte blocks containing symbols.
  9977.  
  9978.        All two-byte and four-byte quantities in the header and
  9979.        symbol records are stored with the most significant byte of
  9980.        the quantity in the first byte of the field and the least
  9981.        significant byte of the quantity in the last byte of the
  9982.        field.
  9983.  
  9984.  
  9985.        11.1  Saturn Object Header Record
  9986.  
  9987.  
  9988.        Object   Size
  9989.         Name    Bytes       Description [Contents]
  9990.        ------------------------------------------------------------------
  9991.        ID         6   File identifier [``Saturn'']
  9992.        Filesize   2   Number of 256-byte blocks in this file
  9993.                       [16-bit unsigned value]
  9994.        Codesize   4   Number of nibbles of code
  9995.        Symbols    2   Number of symbols [16-bit unsigned value]
  9996.        Refs       2   Number of symbol references [16-bit unsigned value]
  9997.        Start      4   Code start address
  9998.        Absolute   1   Absolute/Relocatable [1 means ABS, 0 means REL]
  9999.        Reserved   1   Reserved byte [fill to 16-bit boundary]
  10000.        Date      26   Date of creation [``Day Mon DD HH:MM:SS YYYY  '']
  10001.        Title     40   Title, if any; default = blanks
  10002.        Reserved  20   Reserved bytes [Softkeys]
  10003.        Version   26   Version of program creating file
  10004.        Reserved   4   Reserved bytes [ROM ID]
  10005.        Reserved 118   Reserved bytes [00]
  10006.  
  10007.  
  10008.        11.2  Saturn Object Code Record
  10009.  
  10010.  
  10011.        The code nibbles are stored two per byte in the code record.
  10012.        The first nibble of code is in the most significant nibble
  10013.        of the first code record byte, and the second nibble is in
  10014.        the least significant nibble of that byte.
  10015.  
  10016.  
  10017.        11.3  Saturn Object Symbol Block
  10018.  
  10019.        Symbols are stored in alphabetical order.  The most
  10020.        significant bit of the SymInfo field is the RESOLVED bit.
  10021.        If the RESOLVED bit is set, the symbol is resolved, and has
  10022.        value Value.  If the RESOLVED bit is not set, this is an
  10023.        external symbol whose value is unknown.
  10024.  
  10025.  
  10026.  
  10027.  
  10028.                                  Page 152
  10029.  
  10030.  
  10031.  
  10032.  
  10033.  
  10034.  
  10035.        The second most significant bit of the SymInfo field is the
  10036.        RELOCATABLE bit.  If the RELOCATABLE bit is set, this symbol
  10037.        should be adjusted (relocated) if the starting address of
  10038.        the module is changed.  If the RELOCATABLE bit is not set,
  10039.        this is an absolute symbol which should not be relocated.
  10040.  
  10041.        The remaining 14 bits of the SymInfo field indicate the
  10042.        number of external references to the symbol.  Reference
  10043.        records for the symbol follow the symbol record.
  10044.  
  10045.        Object   Size
  10046.         Name    Bytes       Description [Contents]
  10047.        -----------------------------------------------------
  10048.        SymbID     4   Symbol record identifier [``Symb'']
  10049.        Record    18   Symbol record or reference record
  10050.                       (14 records per block)
  10051.  
  10052.        Symbol Record
  10053.        Name      12   Symbol name [blank-filled]
  10054.        SymInfo    2   Symbol information and reference count
  10055.        Value      4   Symbol value
  10056.  
  10057.        Reference Record
  10058.        Class      1   Fill reference class
  10059.        Subclass   1   Fill reference subclass
  10060.        Address    4   Fill address
  10061.        Adjust     4   Adjustment to fill value
  10062.                       [32-bit signed value]
  10063.        Fillsize   2   Size of fill reference in nibbles
  10064.                       [16-bit unsigned value]
  10065.        Reserved   6   Reserved bytes [pad to 18 bytes]
  10066.  
  10067.  
  10068.  
  10069.  
  10070.  
  10071.  
  10072.  
  10073.  
  10074.  
  10075.  
  10076.  
  10077.  
  10078.  
  10079.  
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.  
  10087.  
  10088.  
  10089.  
  10090.  
  10091.  
  10092.  
  10093.  
  10094.                                  Page 153
  10095.  
  10096.  
  10097.  
  10098.  
  10099.        11.4  Fill Reference Types
  10100.  
  10101.  
  10102.        Class  Subclass   Description
  10103.        ------------------------------------------------------
  10104.          0       0       Direct reference
  10105.          0       1       Direct reference **
  10106.          1       0       Reference relative to start of
  10107.                          reference * **
  10108.          1       1       Reference relative to nibble past
  10109.                          end of reference * **
  10110.          1       2       Reference relative to start of
  10111.                          reference [REL(n)] *
  10112.          2       0       SLINK reference
  10113.          2       1       LINK reference
  10114.          3       0       INC(n) reference
  10115.  
  10116.          * Loader checks that this reference is within range
  10117.         ** Loader may report shortenable references for this
  10118.            reference
  10119.  
  10120.  
  10121.  
  10122.  
  10123.  
  10124.  
  10125.  
  10126.  
  10127.  
  10128.  
  10129.  
  10130.  
  10131.  
  10132.  
  10133.  
  10134.  
  10135.  
  10136.  
  10137.  
  10138.  
  10139.  
  10140.  
  10141.  
  10142.  
  10143.  
  10144.  
  10145.  
  10146.  
  10147.  
  10148.  
  10149.  
  10150.  
  10151.  
  10152.  
  10153.  
  10154.  
  10155.  
  10156.  
  10157.  
  10158.  
  10159.  
  10160.                                  Page 154
  10161.  
  10162.  
  10163.  
  10164.  
  10165.  
  10166.  
  10167.                                  CONTENTS
  10168.  
  10169.  
  10170.         1.  Getting Started...................................    1
  10171.  
  10172.         2.  Saturn CPU Overview...............................    4
  10173.             2.1   Registers...................................    4
  10174.             2.2   Working and Scratch Registers...............    4
  10175.             2.3   Field Selection.............................    5
  10176.             2.4   Pointer Registers...........................    5
  10177.             2.5   Input, Output, and Program Counter
  10178.                   Registers...................................    5
  10179.             2.6   Carry, Program Status, and Hardware Status
  10180.                   Bits........................................    6
  10181.             2.7   Arithmetic Mode.............................    7
  10182.             2.8   Loading Data from Memory....................    7
  10183.             2.9   Storing Data in Memory......................    8
  10184.             2.10  Interrupt System............................    8
  10185.  
  10186.         3.  Conditional Assembly..............................    9
  10187.  
  10188.         4.  Using Macros......................................   10
  10189.             4.1   Defining a Macro............................   10
  10190.             4.2   Calling a Macro.............................   11
  10191.             4.3   Parameter Assignment Rules..................   12
  10192.             4.4   Macro Example...............................   12
  10193.  
  10194.         5.  File Access Statements............................   13
  10195.             5.1   RDSYMB Statement............................   13
  10196.             5.2   INCLUDE Statement...........................   13
  10197.             5.3   CHARMAP Statement...........................   13
  10198.                   5.3.1    Charmap File Format................   14
  10199.  
  10200.         6.  Saturn Assembler Format and Mnemonics.............   15
  10201.             6.1   Instruction Syntax..........................   15
  10202.                   6.1.1    Comments...........................   15
  10203.                   6.1.2    Symbols and Labels.................   15
  10204.                   6.1.3    Expressions........................   16
  10205.             6.2   Explanation of Symbols......................   17
  10206.             6.3   Field Select Table..........................   19
  10207.             6.4   Instruction Set Overview....................   20
  10208.             6.5   Jump Instructions...........................   20
  10209.             6.6   Subroutine Call Instructions................   21
  10210.             6.7   Subroutine Return Instructions..............   21
  10211.             6.8   Test Instructions...........................   22
  10212.                   6.8.1    Register Tests.....................   22
  10213.                   6.8.2    Pointer Tests......................   22
  10214.                   6.8.3    Program Status Bit Tests...........   22
  10215.                   6.8.4    Hardware Status Bit Tests..........   23
  10216.                   6.8.5    Register Bit Tests.................   23
  10217.             6.9   Pointer Instructions........................   23
  10218.             6.10  Bit Manipulation Instructions...............   23
  10219.             6.11  Status Instructions.........................   24
  10220.                   6.11.1   Program Status.....................   24
  10221.                   6.11.2   Hardware Status....................   24
  10222.                   6.11.3   System State Instructions..........   24
  10223.  
  10224.  
  10225.  
  10226.                                   - i -
  10227.  
  10228.  
  10229.  
  10230.  
  10231.                   6.11.4   Keyscan Instructions...............   25
  10232.                   6.11.5   Scratch Register Instructions......   25
  10233.                   6.11.6   Data Pointer Instructions..........   25
  10234.                   6.11.7   Data Transfer Instructions.........   25
  10235.                   6.11.8   Load Constant Instructions.........   26
  10236.                   6.11.9   Shift Instructions.................   26
  10237.                   6.11.10  Arithmetic Instructions............   27
  10238.                   6.11.11  Logical Operation
  10239.                            Instructions.......................   27
  10240.                   6.11.12  No-Operation Instructions..........   27
  10241.             6.12  Pseudo-Op Instructions......................   27
  10242.                   6.12.1   Data Storage Allocation............   28
  10243.             6.13  Conditional Assembly........................   29
  10244.             6.14  Listing Control.............................   30
  10245.             6.15  Symbol Definition...........................   30
  10246.             6.16  Macro Definition............................   31
  10247.             6.17  Assembly Mode...............................   31
  10248.             6.18  File Access.................................   31
  10249.             6.19  Assembly Flag Modification..................   31
  10250.             6.20  Carry State Modification....................   32
  10251.             6.21  Miscellaneous...............................   32
  10252.  
  10253.         7.  Saturn Assembly Tips..............................   33
  10254.             7.1   Three Warnings..............................   33
  10255.                   7.1.1    Return Levels......................   33
  10256.                   7.1.2    Mode...............................   33
  10257.                   7.1.3    Remember P=0!......................   33
  10258.             7.2   Code Packing Tips...........................   34
  10259.                   7.2.1    A-Field Operations.................   34
  10260.                   7.2.2    Loading Constants..................   34
  10261.                   7.2.3    The 3-Branches.....................   34
  10262.                   7.2.4    GOSUB/RTN..........................   35
  10263.                   7.2.5    Use Expressions....................   35
  10264.                   7.2.6    Count Up...........................   35
  10265.                   7.2.7    Before you leap....................   36
  10266.             7.3   Some Common Operations......................   37
  10267.                   7.3.1    A nibble from here to there........   37
  10268.                   7.3.2    Testing a Bit......................   37
  10269.                   7.3.3    Saving/Testing a State.............   39
  10270.                   7.3.4    Memory Access......................   39
  10271.             7.4   Some Other Tips.............................   40
  10272.                   7.4.1    Labels.............................   40
  10273.                   7.4.2    Status Bits........................   40
  10274.                   7.4.3    Entry Points.......................   40
  10275.                   7.4.4    Exits..............................   41
  10276.             7.5   Documentation...............................   41
  10277.                   7.5.1    Comments on Comments...............   41
  10278.                   7.5.2    A Standard Assembly Language
  10279.                            Header.............................   43
  10280.                   7.5.3    Some Header Examples...............   45
  10281.  
  10282.         8.  Mnemonic Dictionary...............................   48
  10283.  
  10284.         9.  Alphabetic Mnemonic List..........................  126
  10285.  
  10286.        10.  Error Messages....................................  137
  10287.             10.1  Non-Fatal Error Messages....................  137
  10288.             10.2  Fatal Error Messages........................  148
  10289.  
  10290.  
  10291.  
  10292.                                   - ii -
  10293.  
  10294.  
  10295.  
  10296.  
  10297.             10.3  Command Line Messages.......................  150
  10298.  
  10299.        11.  Saturn Object File Format.........................  152
  10300.             11.1  Saturn Object Header Record.................  152
  10301.             11.2  Saturn Object Code Record...................  152
  10302.             11.3  Saturn Object Symbol Block..................  152
  10303.             11.4  Fill Reference Types........................  154
  10304.  
  10305.  
  10306.  
  10307.  
  10308.  
  10309.  
  10310.  
  10311.  
  10312.  
  10313.  
  10314.  
  10315.  
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.  
  10323.  
  10324.  
  10325.  
  10326.  
  10327.  
  10328.  
  10329.  
  10330.  
  10331.  
  10332.  
  10333.  
  10334.  
  10335.  
  10336.  
  10337.  
  10338.  
  10339.  
  10340.  
  10341.  
  10342.  
  10343.  
  10344.  
  10345.  
  10346.  
  10347.  
  10348.  
  10349.  
  10350.  
  10351.  
  10352.  
  10353.  
  10354.  
  10355.  
  10356.  
  10357.  
  10358.                                  - iii -
  10359.  
  10360.  
  10361.  
  10362.  
  10363.